chiark / gitweb /
Small cleanup
[elogind.git] / src / core / load-fragment.c
index 0571d517b0113572ba4167eecd1a0d4b5e04020f..3d23372630bd9da0556a4ff1e5e97c7f8ec06953 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;
-                                }
                         }
                 }