mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-03-02 07:21:58 +00:00
fix use after free
This commit is contained in:
parent
b266369561
commit
9e3b01927e
1 changed files with 9 additions and 1 deletions
|
@ -753,7 +753,15 @@ new_fluid_timer (int msec, fluid_timer_callback_t callback, void* data,
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
else fluid_timer_run (timer); /* Run directly, instead of as a separate thread */
|
||||
else
|
||||
{
|
||||
fluid_timer_run (timer); /* Run directly, instead of as a separate thread */
|
||||
if(timer->auto_destroy)
|
||||
{
|
||||
/* do NOT return freed memory */
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return timer;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue