mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
Merge pull request #26 from daniel-k/devel
kernel/clone_task: also destroy interrupt stack on failure
This commit is contained in:
commit
bb1e2d7d5f
1 changed files with 4 additions and 1 deletions
|
@ -409,8 +409,10 @@ int clone_task(tid_t* id, entry_point_t ep, void* arg, uint8_t prio)
|
|||
kprintf("start new thread %d on core %d with stack address %p\n", i, core_id, stack);
|
||||
|
||||
out:
|
||||
if (ret)
|
||||
if (ret) {
|
||||
destroy_stack(stack, DEFAULT_STACK_SIZE);
|
||||
destroy_stack(ist, KERNEL_STACK_SIZE);
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (core_id != CORE_ID)
|
||||
|
@ -510,6 +512,7 @@ out:
|
|||
|
||||
if (ret) {
|
||||
destroy_stack(stack, DEFAULT_STACK_SIZE);
|
||||
destroy_stack(ist, KERNEL_STACK_SIZE);
|
||||
kfree(counter);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue