Commit ae62adc7 authored by Rafaël Carré's avatar Rafaël Carré

demux: fix a memory leak in flac & mpga when attachments are present

parent 98a6a934
......@@ -206,6 +206,10 @@ static void Close( vlc_object_t * p_this )
demux_sys_t *p_sys = p_demux->p_sys;
TAB_CLEAN( p_sys->i_seekpoint, p_sys->seekpoint );
int i;
for( i = 0; i < p_sys->i_attachments; i++ )
free( p_sys->attachments[i] );
TAB_CLEAN( p_sys->i_attachments, p_sys->attachments);
/* Unneed module */
......
......@@ -347,6 +347,9 @@ static void Close( vlc_object_t * p_this )
if( p_sys->meta ) vlc_meta_Delete( p_sys->meta );
if( p_sys->p_block_out ) block_Release( p_sys->p_block_out );
int i;
for( i = 0; i < p_sys->i_attachments; i++ )
free( p_sys->attachments[i] );
TAB_CLEAN( p_sys->i_attachments, p_sys->attachments);
free( p_sys );
......
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