summaryrefslogtreecommitdiffstats
path: root/common/bootargs.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/bootargs.c')
-rw-r--r--common/bootargs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/common/bootargs.c b/common/bootargs.c
index a89f23a3f2..f0ab689158 100644
--- a/common/bootargs.c
+++ b/common/bootargs.c
@@ -56,19 +56,21 @@ const char *linux_bootargs_get(void)
bootargs = basprintf("%s mtdparts=%s", linux_bootargs,
parts);
free(linux_bootargs);
- free(parts);
linux_bootargs = bootargs;
}
+ free(parts);
+
parts = globalvar_get_match("linux.blkdevparts.", ";");
if (strlen(parts)) {
bootargs = basprintf("%s blkdevparts=%s", linux_bootargs,
parts);
free(linux_bootargs);
- free(parts);
linux_bootargs = bootargs;
}
+ free(parts);
+
return linux_bootargs;
}