Fix NULL deref in delete_fluid_ladspa_effect() (#963)

This commit is contained in:
Tom M 2021-08-23 20:04:44 +02:00 committed by GitHub
parent 2fafca42a1
commit c1e286629f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1325,13 +1325,16 @@ 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
* to audio ports might be connected to other effects as well, so we simply remove
* any pointers to them from the effect. */
for(i = 0; i < effect->desc->PortCount; i++)
if(effect->desc != NULL)
{
node = (fluid_ladspa_node_t *) effect->port_nodes[i];
if(node && node->type & FLUID_LADSPA_NODE_CONTROL)
for(i = 0; i < effect->desc->PortCount; i++)
{
delete_fluid_ladspa_node(node);
node = (fluid_ladspa_node_t *) effect->port_nodes[i];
if(node && node->type & FLUID_LADSPA_NODE_CONTROL)
{
delete_fluid_ladspa_node(node);
}
}
}