chiark / gitweb /
Start ctrl-alt-del.target irreversibly
[elogind.git] / src / core / load-fragment.c
index 0571d517b0113572ba4167eecd1a0d4b5e04020f..e2015ed58f4699585ec9e0f1cf075c2b9045dad9 100644 (file)
@@ -2095,11 +2095,9 @@ static int open_follow(char **filename, FILE **_f, Set *names, char **_final) {
                                 if (!id)
                                         return -ENOMEM;
 
-                                r = set_put(names, id);
-                                if (r < 0) {
-                                        free(id);
+                                r = set_consume(names, id);
+                                if (r < 0)
                                         return r;
-                                }
                         }
                 }
 
@@ -2272,7 +2270,7 @@ static int load_from_path(Unit *u, const char *path) {
                 /* Now, parse the file contents */
                 r = config_parse(u->id, filename, f, UNIT_VTABLE(u)->sections,
                                  config_item_perf_lookup,
-                                 (void*) load_fragment_gperf_lookup, false, u);
+                                 (void*) load_fragment_gperf_lookup, false, true, u);
                 if (r < 0)
                         goto finish;