author: Masami Hiramatsu <mhiramat@kernel.org> 2021-09-16 15:23:12 +0900
committer: Steven Rostedt (VMware) <rostedt@goodmis.org> 2021-10-10 22:27:40 -0400
commit: 1ae43851b18afe861120ebd7c426dc44f06bb2bd
parent: 6675880fc4b7c5137a2640b0725505c21b1ac525
Commit Summary:
Diffstat:
1 file changed, 1 insertion, 0 deletions
diff --git a/init/main.c b/init/main.c
index 81a79a77db46..3c4054a95545 100644
--- a/init/main.c
+++ b/init/main.c
@@ -382,6 +382,7 @@ static char * __init xbc_make_cmdline(const char *key)
ret = xbc_snprint_cmdline(new_cmdline, len + 1, root);
if (ret < 0 || ret > len) {
pr_err("Failed to print extra kernel cmdline.\n");
+ memblock_free_ptr(new_cmdline, len + 1);
return NULL;
}