summaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorVitaliy Ivanov <vitalivanov@gmail.com>2011-07-26 02:12:51 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 05:57:13 +0200
commit9a8beb93067764344523386e0e5388d3fd78add7 (patch)
treed8458ea042a52610a3b1c0f9517f50ecd67c849a /arch/um
parentuml: helper.c warning corrections (diff)
downloadlinux-9a8beb93067764344523386e0e5388d3fd78add7.tar.xz
linux-9a8beb93067764344523386e0e5388d3fd78add7.zip
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>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/drivers/slip_user.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c
index a1c2d2c98a94..cbacfc4e63e6 100644
--- a/arch/um/drivers/slip_user.c
+++ b/arch/um/drivers/slip_user.c
@@ -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;