You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07: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:
committed by
Linus Torvalds
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);
|
||||
|
||||
Reference in New Issue
Block a user