[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>
This commit is contained in:
committed by
Linus Torvalds
parent
b2670eacfb
commit
d9d645f06a
@ -136,8 +136,6 @@ int xterm_open(int input, int output, int primary, void *d,
|
||||
return(pid);
|
||||
}
|
||||
|
||||
if(data->stack == 0) free_stack(stack, 0);
|
||||
|
||||
if (data->direct_rcv) {
|
||||
new = os_rcv_fd(fd, &data->helper_pid);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user