mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-17 01:04:19 +08:00
uml: drivers/net_user.c memory leak fix
Perform memory cleanup on exit. On receiving invalid 'pid' we still should clean 'output' variable. Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
7fa38e7e9e
commit
fbee8d933c
@ -228,7 +228,10 @@ static void change(char *dev, char *what, unsigned char *addr,
|
||||
"buffer\n");
|
||||
|
||||
pid = change_tramp(argv, output, output_len);
|
||||
if (pid < 0) return;
|
||||
if (pid < 0) {
|
||||
kfree(output);
|
||||
return;
|
||||
}
|
||||
|
||||
if (output != NULL) {
|
||||
printk("%s", output);
|
||||
|
Loading…
Reference in New Issue
Block a user