mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-01-06 01:41:15 +00:00
Fix NULL deref in delete_fluid_ladspa_effect() (#963)
This commit is contained in:
parent
2fafca42a1
commit
c1e286629f
1 changed files with 8 additions and 5 deletions
|
@ -1325,6 +1325,8 @@ static void delete_fluid_ladspa_effect(fluid_ladspa_effect_t *effect)
|
||||||
* are private to this effect, so we can safely remove them here. Nodes connected
|
* are private to this effect, so we can safely remove them here. Nodes connected
|
||||||
* to audio ports might be connected to other effects as well, so we simply remove
|
* to audio ports might be connected to other effects as well, so we simply remove
|
||||||
* any pointers to them from the effect. */
|
* any pointers to them from the effect. */
|
||||||
|
if(effect->desc != NULL)
|
||||||
|
{
|
||||||
for(i = 0; i < effect->desc->PortCount; i++)
|
for(i = 0; i < effect->desc->PortCount; i++)
|
||||||
{
|
{
|
||||||
node = (fluid_ladspa_node_t *) effect->port_nodes[i];
|
node = (fluid_ladspa_node_t *) effect->port_nodes[i];
|
||||||
|
@ -1334,6 +1336,7 @@ static void delete_fluid_ladspa_effect(fluid_ladspa_effect_t *effect)
|
||||||
delete_fluid_ladspa_node(node);
|
delete_fluid_ladspa_node(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
FLUID_FREE(effect->port_nodes);
|
FLUID_FREE(effect->port_nodes);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue