tdecacqu / rpms / systemd

Forked from rpms/systemd 3 years ago
Clone
68bdd43
From 9a46fc3b9014de1bf0ed1f3004a536b08a19ebb3 Mon Sep 17 00:00:00 2001
68bdd43
From: Michal Schmidt <mschmidt@redhat.com>
68bdd43
Date: Tue, 6 Dec 2011 00:47:28 +0100
68bdd43
Subject: [PATCH] unit: garbage collect units with load error
68bdd43
68bdd43
Units that failed to load were never cleaned up. It was possible to
68bdd43
reach the 128K limit of units by attempting to load a bunch of nonsense.
68bdd43
68bdd43
Bug observed by Reartes Guillermo in
68bdd43
https://bugzilla.redhat.com/show_bug.cgi?id=680122
68bdd43
---
68bdd43
 src/unit.c |    1 +
68bdd43
 1 files changed, 1 insertions(+), 0 deletions(-)
68bdd43
68bdd43
diff --git a/src/unit.c b/src/unit.c
68bdd43
index 2a549e2..018e986 100644
68bdd43
--- a/src/unit.c
68bdd43
+++ b/src/unit.c
68bdd43
@@ -858,6 +858,7 @@ fail:
68bdd43
         u->meta.load_state = UNIT_ERROR;
68bdd43
         u->meta.load_error = r;
68bdd43
         unit_add_to_dbus_queue(u);
68bdd43
+        unit_add_to_gc_queue(u);
68bdd43
 
68bdd43
         log_debug("Failed to load configuration for %s: %s", u->meta.id, strerror(-r));
68bdd43
 
68bdd43
-- 
68bdd43
1.7.7.5
68bdd43