diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2006-10-20 02:28:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-20 13:26:36 -0400 |
commit | d9d645f06a8f50659bbae2be64ed8367ba068fc0 (patch) | |
tree | a514ffe62493538e0e5725685380b961e6ca4483 /arch/um/drivers/xterm.c | |
parent | b2670eacfb013169b8bf151a5078a9ef8ef86466 (diff) |
[PATCH] uml: cleanup run_helper() API to fix a leak
Freeing the stack is left uselessly to the caller of run_helper in some cases
- this is taken from run_helper_thread, but here it is useless, so no caller
needs it and the only place where this happens has a potential leak - in case
of error neither run_helper() nor xterm_open() call free_stack(). At this
point passing a pointer is not needed - the stack pointer should be passed
directly, but this change is not done here.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers/xterm.c')
-rw-r--r-- | arch/um/drivers/xterm.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c index 386f8b952982..850221d9b4c9 100644 --- a/arch/um/drivers/xterm.c +++ b/arch/um/drivers/xterm.c | |||
@@ -136,8 +136,6 @@ int xterm_open(int input, int output, int primary, void *d, | |||
136 | return(pid); | 136 | return(pid); |
137 | } | 137 | } |
138 | 138 | ||
139 | if(data->stack == 0) free_stack(stack, 0); | ||
140 | |||
141 | if (data->direct_rcv) { | 139 | if (data->direct_rcv) { |
142 | new = os_rcv_fd(fd, &data->helper_pid); | 140 | new = os_rcv_fd(fd, &data->helper_pid); |
143 | } else { | 141 | } else { |