chiark / gitweb /
Introduce strv_consume which takes ownership
[elogind.git] / src / core / dbus-execute.c
index 6d0bdce9dc4551eb4befced6d4801b6718583175..3a05303f084070ffa8fbcab543bc49f7420a2ec7 100644 (file)
@@ -385,11 +385,9 @@ static int property_get_syscall_filter(
                 if (!name)
                         continue;
 
-                r = strv_push(&l, name);
-                if (r < 0) {
-                        free(name);
-                        return -ENOMEM;
-                }
+                r = strv_consume(&l, name);
+                if (r < 0)
+                        return r;
         }
 #endif