chiark / gitweb /
build-sys: discover the path to kexec during build time
[elogind.git] / src / tmpfiles / tmpfiles.c
index 535381c470b13a4e221b105ce172ee3055561433..555347ac36ec70e9084b7a65a4f81664f30a4cb3 100644 (file)
@@ -186,13 +186,9 @@ static void load_unix_sockets(void) {
 
                 path_kill_slashes(s);
 
-                k = set_put(unix_sockets, s);
-                if (k < 0) {
-                        free(s);
-
-                        if (k != -EEXIST)
-                                goto fail;
-                }
+                k = set_consume(unix_sockets, s);
+                if (k < 0 && k != -EEXIST)
+                        goto fail;
         }
 
         return;
@@ -787,7 +783,7 @@ static int create_item(Item *i) {
 
                 r = glob_item(i, item_set_perms);
                 if (r < 0)
-                        return 0;
+                        return r;
                 break;
 
         case RECURSIVE_RELABEL_PATH: