From: Vitaliy Ivanov Date: Tue, 26 Jul 2011 00:12:51 +0000 (-0700) Subject: uml: drivers/slip_user.c memory leak fix X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9a8beb93067764344523386e0e5388d3fd78add7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git uml: drivers/slip_user.c memory leak fix Do not free memory when you failed to allocate it. Signed-off-by: Vitaliy Ivanov Signed-off-by: Richard Weinberger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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;