minor bug fix in sys_kill

This commit is contained in:
TXuian
2025-01-07 22:15:15 +08:00
parent fd95d9a7de
commit 42b17738ee
5 changed files with 9 additions and 10 deletions
@@ -40,9 +40,9 @@ int sys_new_thread(struct MemSpace* pmemspace, struct Thread* task, uintptr_t en
struct ThreadStackPointer loaded_sp = load_user_stack(pmemspace, argv);
if (loaded_sp.stack_idx == -1) {
ERROR("Uable to load params to memspace.\n");
/* memspace is freed alone with free_pcb() */
/* memspace is freed alone with free_thread() */
struct TaskLifecycleOperations* tlo = GetSysObject(struct TaskLifecycleOperations, &xizi_task_manager.task_lifecycle_ops_tag);
tlo->free_pcb(task);
tlo->free_thread(task);
return -1;
}