[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1311239914-8301-3-git-send-email-richard@nod.at>
Date: Thu, 21 Jul 2011 11:18:27 +0200
From: Richard Weinberger <richard@....at>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org,
user-mode-linux-devel@...ts.sourceforge.net,
Vitaliy Ivanov <vitalivanov@...il.com>,
Richard Weinberger <richard@....at>
Subject: [PATCH 03/10] uml: drivers/slip_user.c memory leak fix
From: Vitaliy Ivanov <vitalivanov@...il.com>
Do not free memory when you failed to allocate it.
Signed-off-by: Vitaliy Ivanov <vitalivanov@...il.com>
Signed-off-by: Richard Weinberger <richard@....at>
---
arch/um/drivers/slip_user.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c
index a1c2d2c..cbacfc4 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;
--
1.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists