]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
fstab-generator: Small cleanup
authorTobias Hunger <tobias.hunger@digia.com>
Sat, 4 Oct 2014 00:41:43 +0000 (20:41 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 4 Oct 2014 00:42:09 +0000 (20:42 -0400)
src/fstab-generator/fstab-generator.c

index 5dafcba3c097044c3ab31626bdfe03eaf91a3cde..b75bbb7998bf981cb996d16c1d672577d7f5e598 100644 (file)
@@ -511,16 +511,12 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
 
         } else if (streq(key, "root") && value) {
 
-                free(arg_root_what);
-                arg_root_what = strdup(value);
-                if (!arg_root_what)
+                if (free_and_strdup(&arg_root_what, value) < 0)
                         return log_oom();
 
         } else if (streq(key, "rootfstype") && value) {
 
-                free(arg_root_fstype);
-                arg_root_fstype = strdup(value);
-                if (!arg_root_fstype)
+                if (free_and_strdup(&arg_root_fstype, value) < 0)
                         return log_oom();
 
         } else if (streq(key, "rootflags") && value) {