mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-11 21:31:18 +00:00
defsfont: Fix memory leaks in error paths
Patch credit: surabhi-mishra
This commit is contained in:
parent
89898893b1
commit
ccb2875503
1 changed files with 2 additions and 0 deletions
|
@ -1054,6 +1054,7 @@ fluid_defpreset_import_sfont(fluid_defpreset_t* preset,
|
|||
return FLUID_FAILED;
|
||||
}
|
||||
if (fluid_preset_zone_import_sfont(zone, sfzone, sfont) != FLUID_OK) {
|
||||
delete_fluid_preset_zone(zone);
|
||||
return FLUID_FAILED;
|
||||
}
|
||||
if ((count == 0) && (fluid_preset_zone_get_inst(zone) == NULL)) {
|
||||
|
@ -1455,6 +1456,7 @@ fluid_inst_import_sfont(fluid_inst_t* inst, SFInst *sfinst, fluid_defsfont_t* sf
|
|||
}
|
||||
|
||||
if (fluid_inst_zone_import_sfont(zone, sfzone, sfont) != FLUID_OK) {
|
||||
delete_fluid_inst_zone(zone);
|
||||
return FLUID_FAILED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue