提交 9a8beb93 编写于 作者: V Vitaliy Ivanov 提交者: Linus Torvalds

uml: drivers/slip_user.c memory leak fix

Do not free memory when you failed to allocate it.
Signed-off-by: NVitaliy Ivanov <vitalivanov@gmail.com>
Signed-off-by: NRichard Weinberger <richard@nod.at>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 2fdf2130
......@@ -102,7 +102,7 @@ static int slip_tramp(char **argv, int fd)
"buffer\n");
os_kill_process(pid, 1);
err = -ENOMEM;
goto out_free;
goto out_close;
}
close(fds[1]);
......@@ -112,7 +112,6 @@ static int slip_tramp(char **argv, int fd)
err = helper_wait(pid);
close(fds[0]);
out_free:
kfree(output);
return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册