chiark / gitweb /
Add set_consume which always takes ownership
[elogind.git] / src / systemctl / systemctl.c
index c2b1749def81fae54128527207ba6a73571a752a..b94f7f795858b3c2e395df8019efacf60afc11cd 100644 (file)
@@ -1843,9 +1843,8 @@ static int start_unit_one(
                 if (!p)
                         return log_oom();
 
-                r = set_put(s, p);
+                r = set_consume(s, p);
                 if (r < 0) {
-                        free(p);
                         log_error("Failed to add path to set.");
                         return r;
                 }