]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mount-util: use set_put_strdup() where appropriate
authorLennart Poettering <lennart@poettering.net>
Mon, 25 Mar 2019 15:57:55 +0000 (16:57 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 25 Mar 2019 18:33:55 +0000 (19:33 +0100)
src/shared/mount-util.c

index 8af90a5e31d8b452520365f81fdab7d311855851..72cf6c41b6a1788471bbe467add8635dfbc3aef4 100644 (file)
@@ -250,11 +250,7 @@ int bind_remount_recursive_with_mountinfo(const char *prefix, bool ro, char **bl
 
                         log_debug("Made top-level directory %s a mount point.", prefix);
 
-                        x = strdup(cleaned);
-                        if (!x)
-                                return -ENOMEM;
-
-                        r = set_consume(done, x);
+                        r = set_put_strdup(done, cleaned);
                         if (r < 0)
                                 return r;
                 }