mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 22:21:42 +00:00
uml: drivers/slip_user.c memory leak fix
Do not free memory when you failed to allocate it. 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
2fdf213092
commit
9a8beb9306
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user