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

mosaic: Free string variables after using them

parent 482492e0
...@@ -283,7 +283,7 @@ static int CreateFilter( vlc_object_t *p_this ) ...@@ -283,7 +283,7 @@ static int CreateFilter( vlc_object_t *p_this )
filter_t *p_filter = (filter_t *)p_this; filter_t *p_filter = (filter_t *)p_this;
filter_sys_t *p_sys; filter_sys_t *p_sys;
vlc_object_t *p_libvlc = VLC_OBJECT( p_filter->p_libvlc ); vlc_object_t *p_libvlc = VLC_OBJECT( p_filter->p_libvlc );
char *psz_order; char *psz_order, *_psz_order;
char *psz_offsets; char *psz_offsets;
int i_index; int i_index;
vlc_value_t val; vlc_value_t val;
...@@ -349,6 +349,7 @@ static int CreateFilter( vlc_object_t *p_this ) ...@@ -349,6 +349,7 @@ static int CreateFilter( vlc_object_t *p_this )
p_sys->i_order_length = 0; p_sys->i_order_length = 0;
p_sys->ppsz_order = NULL; p_sys->ppsz_order = NULL;
psz_order = var_CreateGetStringCommand( p_filter, CFG_PREFIX "order" ); psz_order = var_CreateGetStringCommand( p_filter, CFG_PREFIX "order" );
_psz_order = psz_order;
var_AddCallback( p_filter, CFG_PREFIX "order", MosaicCallback, p_sys ); var_AddCallback( p_filter, CFG_PREFIX "order", MosaicCallback, p_sys );
if( *psz_order ) if( *psz_order )
...@@ -368,12 +369,15 @@ static int CreateFilter( vlc_object_t *p_this ) ...@@ -368,12 +369,15 @@ static int CreateFilter( vlc_object_t *p_this )
p_sys->i_order_length = i_index; p_sys->i_order_length = i_index;
} }
free( _psz_order );
/* Manage specific offsets for substreams */ /* Manage specific offsets for substreams */
psz_offsets = var_CreateGetStringCommand( p_filter, CFG_PREFIX "offsets" ); psz_offsets = var_CreateGetStringCommand( p_filter, CFG_PREFIX "offsets" );
p_sys->i_offsets_length = 0; p_sys->i_offsets_length = 0;
p_sys->pi_x_offsets = NULL; p_sys->pi_x_offsets = NULL;
p_sys->pi_y_offsets = NULL; p_sys->pi_y_offsets = NULL;
mosaic_ParseSetOffsets( p_filter, p_sys, psz_offsets ); mosaic_ParseSetOffsets( p_filter, p_sys, psz_offsets );
free( psz_offsets );
var_AddCallback( p_filter, CFG_PREFIX "offsets", MosaicCallback, p_sys ); var_AddCallback( p_filter, CFG_PREFIX "offsets", MosaicCallback, p_sys );
vlc_mutex_unlock( &p_sys->lock ); vlc_mutex_unlock( &p_sys->lock );
......
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