Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39961
b: refs/heads/master
c: d9d645f
h: refs/heads/master
i:
  39959: fdd82fa
v: v3
  • Loading branch information
Paolo 'Blaisorblade' Giarrusso authored and Linus Torvalds committed Oct 20, 2006
1 parent 30b6a56 commit 3ace83c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b2670eacfb013169b8bf151a5078a9ef8ef86466
refs/heads/master: d9d645f06a8f50659bbae2be64ed8367ba068fc0
2 changes: 0 additions & 2 deletions trunk/arch/um/drivers/xterm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 3 additions & 4 deletions trunk/arch/um/os-Linux/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ static int helper_child(void *arg)
}

/* Returns either the pid of the child process we run or -E* on failure.
* XXX The alloc_stack here breaks if this is called in the tracing thread */
* XXX The alloc_stack here breaks if this is called in the tracing thread, so
* we need to receive a preallocated stack (a local buffer is ok). */
int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv,
unsigned long *stack_out)
{
Expand Down Expand Up @@ -113,10 +114,8 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv,
close(fds[1]);
close(fds[0]);
out_free:
if (stack_out == NULL)
if ((stack_out == NULL) || (*stack_out == 0))
free_stack(stack, 0);
else
*stack_out = stack;
return ret;
}

Expand Down

0 comments on commit 3ace83c

Please sign in to comment.