Commit 92c977e2 authored by Laurent Aimar's avatar Laurent Aimar Committed by Rémi Duraffort

Fixed double frees in libvlc_audio_output_device_longname/id.

(cherry picked from commit f103a7c2)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent bec259b4
......@@ -198,10 +198,11 @@ char * libvlc_audio_output_device_longname( libvlc_instance_t *p_instance,
VLC_OBJECT( p_instance->p_libvlc_int ), psz_config_name, val, val, NULL );
free( val.psz_string );
}
free( psz_config_name );
if( i_device >= 0 && i_device < p_module_config->i_list )
{
free( psz_config_name );
if( p_module_config->ppsz_list_text[i_device] )
return strdup( p_module_config->ppsz_list_text[i_device] );
else
......@@ -241,11 +242,12 @@ char * libvlc_audio_output_device_id( libvlc_instance_t *p_instance,
VLC_OBJECT( p_instance->p_libvlc_int ), psz_config_name, val, val, NULL );
free( val.psz_string );
}
free( psz_config_name );
if( i_device >= 0 && i_device < p_module_config->i_list )
{
free( psz_config_name );
return strdup( p_module_config->ppsz_list[i_device] );
}
}
free( psz_config_name );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment