From: Tobias Hunger Date: Sat, 4 Oct 2014 00:41:43 +0000 (-0400) Subject: fstab-generator: Small cleanup X-Git-Tag: v217~322 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f88dc3edeb9c49622fcc773cb6153238fe9efbe2;p=platform%2Fupstream%2Fsystemd.git fstab-generator: Small cleanup --- diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index 5dafcba3c0..b75bbb7998 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -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) {