chiark / gitweb /
set: introduce set_free_free()
[elogind.git] / src / load-fragment.c
index 5f5e37397b222c4354be13ef5eb02bc527eb0bb2..b679fab479a3e29a280a4c6a6bd604fa25780db8 100644 (file)
@@ -1483,7 +1483,6 @@ static int load_from_path(Unit *u, const char *path) {
 #undef EXEC_CONTEXT_CONFIG_ITEMS
 
         const char *sections[3];
-        char *k;
         int r;
         Set *symlink_names;
         FILE *f = NULL;
@@ -1581,10 +1580,7 @@ static int load_from_path(Unit *u, const char *path) {
         r = 0;
 
 finish:
-        while ((k = set_steal_first(symlink_names)))
-                free(k);
-
-        set_free(symlink_names);
+        set_free_free(symlink_names);
         free(filename);
 
         if (f)