task_spawn: release g_spawn_parmsem and sched_unlock at the ending

Change-Id: Ifcb5b9921e82fc495c4457fdb5f0607f40b07fc0
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2021-08-19 16:07:00 +08:00 committed by Xiang Xiao
parent 9701a678bd
commit 35b3898ce1

View File

@ -437,7 +437,7 @@ int task_spawn(FAR const char *name, main_t entry,
goto errout_with_lock; goto errout_with_lock;
} }
return (int)pid; ret = (int)pid;
errout_with_lock: errout_with_lock:
#ifdef CONFIG_SCHED_WAITPID #ifdef CONFIG_SCHED_WAITPID