summaryrefslogtreecommitdiff
authorMichal Schmidt <mschmidt@redhat.com>2011-12-05 23:47:28 (GMT)
committer Michal Schmidt <mschmidt@redhat.com>2011-12-05 23:52:37 (GMT)
commit9a46fc3b9014de1bf0ed1f3004a536b08a19ebb3 (patch) (side-by-side diff)
tree79a8a216b6ca24d53314dd5da2a9b6e67bff5a7e
parentd380a3bcd14376ed72286e78dbcc871b7d6d2151 (diff)
downloadsystemd-9a46fc3b9014de1bf0ed1f3004a536b08a19ebb3.zip
systemd-9a46fc3b9014de1bf0ed1f3004a536b08a19ebb3.tar.gz
unit: garbage collect units with load error
Units that failed to load were never cleaned up. It was possible to reach the 128K limit of units by attempting to load a bunch of nonsense. Bug observed by Reartes Guillermo in https://bugzilla.redhat.com/show_bug.cgi?id=680122
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--src/unit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/unit.c b/src/unit.c
index 2a549e2..018e986 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -858,6 +858,7 @@ fail:
u->meta.load_state = UNIT_ERROR;
u->meta.load_error = r;
unit_add_to_dbus_queue(u);
+ unit_add_to_gc_queue(u);
log_debug("Failed to load configuration for %s: %s", u->meta.id, strerror(-r));