X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fum%2Fkernel%2Fhelper.c;h=6c71144172c2ad7eb3ddf748172846969ae0f12a;hb=c55ad184b24d5cb8408259bf34d293d3b1a2b240;hp=0e3d409d9b3f6771380374eaa61e99960c3e6ff7;hpb=8d40237c730b8be87c1b80a5d96b9c603fefa829;p=linux-2.6.git diff --git a/arch/um/kernel/helper.c b/arch/um/kernel/helper.c index 0e3d409d9..6c7114417 100644 --- a/arch/um/kernel/helper.c +++ b/arch/um/kernel/helper.c @@ -100,8 +100,13 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv, CATCH_EINTR(n = waitpid(pid, NULL, 0)); pid = -errno; } + err = pid; - if(stack_out == NULL) free_stack(stack, 0); + out_close: + os_close_file(fds[0]); + out_free: + if(stack_out == NULL) + free_stack(stack, 0); else *stack_out = stack; return(pid);