(lwpNewContext) [UCONTEXT]: Fix the previous revision.
This commit is contained in:
parent
9e3db08fda
commit
e841fc0826
1 changed files with 3 additions and 1 deletions
|
@ -73,8 +73,10 @@ lwpNewContext(struct lwpProc *newp, int stacksz)
|
|||
newp->ustack = s + redsize;
|
||||
newp->usize = stacksz;
|
||||
|
||||
if (getcontext(&newp->context) < 0)
|
||||
if (getcontext(&newp->context) < 0) {
|
||||
free(s);
|
||||
return -1;
|
||||
}
|
||||
newp->context.uc_stack.ss_sp = newp->ustack;
|
||||
newp->context.uc_stack.ss_size = newp->usize;
|
||||
newp->context.uc_stack.ss_flags = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue