1
0
Fork 0
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:
Stefan Lankes 2016-06-24 21:52:26 +02:00 committed by GitHub
commit bb1e2d7d5f

View file

@ -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);
}