mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-18 05:31:02 +00:00
fix double free in fluid_sample_set_sound_data()
This commit is contained in:
parent
15d27b7145
commit
b7b420617b
1 changed files with 5 additions and 2 deletions
|
@ -572,9 +572,10 @@ fluid_sample_set_sound_data(fluid_sample_t *sample,
|
|||
{
|
||||
FLUID_FREE(sample->data);
|
||||
FLUID_FREE(sample->data24);
|
||||
sample->data = NULL;
|
||||
sample->data24 = NULL;
|
||||
}
|
||||
|
||||
sample->data = NULL;
|
||||
sample->data24 = NULL;
|
||||
|
||||
if(copy_data)
|
||||
{
|
||||
|
@ -637,6 +638,8 @@ error_rec:
|
|||
FLUID_LOG(FLUID_ERR, "Out of memory");
|
||||
FLUID_FREE(sample->data);
|
||||
FLUID_FREE(sample->data24);
|
||||
sample->data = NULL;
|
||||
sample->data24 = NULL;
|
||||
return FLUID_FAILED;
|
||||
|
||||
#undef SAMPLE_LOOP_MARGIN
|
||||
|
|
Loading…
Reference in a new issue