Commit 26cde75f authored by Thomas Guillem's avatar Thomas Guillem

libvlc: fix libvlc_media_slaves_release with a count of 0

Since pp_slaves is not initialised when libvlc_media_slaves_get() returns 0.
parent a49d7a78
......@@ -1220,8 +1220,11 @@ unsigned int libvlc_media_slaves_get( libvlc_media_t *p_md,
void libvlc_media_slaves_release( libvlc_media_slave_t **pp_slaves,
unsigned int i_count )
{
assert( pp_slaves );
for( unsigned int i = 0; i < i_count; ++i )
free(pp_slaves[i]);
free(pp_slaves);
if( i_count > 0 )
{
assert( pp_slaves );
for( unsigned int i = 0; i < i_count; ++i )
free( pp_slaves[i] );
free( pp_slaves );
}
}
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