mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-01 17:40:34 +00:00
Use after fix due to task free on non positive counting (#12138)
This commit is contained in:
parent
8bc369ef3f
commit
5783cf42c4
@ -242,12 +242,13 @@ R_API void r_core_task_decref (RCoreTask *task) {
|
||||
return;
|
||||
}
|
||||
TASK_SIGSET_T old_sigset;
|
||||
tasks_lock_enter (task->core, &old_sigset);
|
||||
RCore *core = task->core;
|
||||
tasks_lock_enter (core, &old_sigset);
|
||||
task->refcount--;
|
||||
if (task->refcount <= 0) {
|
||||
task_free (task);
|
||||
}
|
||||
tasks_lock_leave (task->core, &old_sigset);
|
||||
tasks_lock_leave (core, &old_sigset);
|
||||
}
|
||||
|
||||
R_API void r_core_task_schedule(RCoreTask *current, RTaskState next_state) {
|
||||
|
Loading…
Reference in New Issue
Block a user