summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@digia.com>2014-10-03 20:41:43 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-10-03 20:42:09 -0400
commitf88dc3edeb9c49622fcc773cb6153238fe9efbe2 (patch)
tree4d5f5d15277b48fbc0f796c453bc4e54a6817918 /src
parent125dd07483b6836106ff9ad3ce1737d8a6c56c59 (diff)
fstab-generator: Small cleanup
Diffstat (limited to 'src')
-rw-r--r--src/fstab-generator/fstab-generator.c8
1 files changed, 2 insertions, 6 deletions
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) {