]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/shared/machine-image.c
macro: introduce TAKE_PTR() macro
[thirdparty/systemd.git] / src / shared / machine-image.c
index 66eefb3036628ecb02f7168f597e50ccfbe19e89..f48b6c693ca3b2051ab2741ff2e2c52cf6dfdd63 100644 (file)
@@ -80,7 +80,6 @@ Image *image_unref(Image *i) {
 
 static char **image_settings_path(Image *image) {
         _cleanup_strv_free_ char **l = NULL;
-        char **ret;
         const char *fn, *s;
         unsigned i = 0;
 
@@ -104,10 +103,7 @@ static char **image_settings_path(Image *image) {
         if (!l[i])
                 return NULL;
 
-        ret = l;
-        l = NULL;
-
-        return ret;
+        return TAKE_PTR(l);
 }
 
 static char *image_roothash_path(Image *image) {