Commit 46a33c34 authored by Rémi Duraffort's avatar Rémi Duraffort

gestures: fix memleak with var_Change(VLC_VAR_GETCHOICES).

parent 128bfa77
...@@ -322,6 +322,8 @@ static void RunIntf( intf_thread_t *p_intf ) ...@@ -322,6 +322,8 @@ static void RunIntf( intf_thread_t *p_intf )
i_count = list.p_list->i_count; i_count = list.p_list->i_count;
if( i_count <= 1 ) if( i_count <= 1 )
{ {
var_Change( p_input, "audio-es", VLC_VAR_FREELIST, &list,
&list2 );
vlc_object_release( p_input ); vlc_object_release( p_input );
break; break;
} }
...@@ -342,6 +344,8 @@ static void RunIntf( intf_thread_t *p_intf ) ...@@ -342,6 +344,8 @@ static void RunIntf( intf_thread_t *p_intf )
else else
i++; i++;
var_Set( p_input, "audio-es", list.p_list->p_values[i] ); var_Set( p_input, "audio-es", list.p_list->p_values[i] );
var_Change( p_input, "audio-es", VLC_VAR_FREELIST, &list,
&list2 );
vlc_object_release( p_input ); vlc_object_release( p_input );
} }
break; break;
...@@ -365,6 +369,8 @@ static void RunIntf( intf_thread_t *p_intf ) ...@@ -365,6 +369,8 @@ static void RunIntf( intf_thread_t *p_intf )
if( i_count <= 1 ) if( i_count <= 1 )
{ {
vlc_object_release( p_input ); vlc_object_release( p_input );
var_Change( p_input, "spu-es", VLC_VAR_FREELIST,
&list, &list2 );
break; break;
} }
for( i = 0; i < i_count; i++ ) for( i = 0; i < i_count; i++ )
...@@ -386,6 +392,8 @@ static void RunIntf( intf_thread_t *p_intf ) ...@@ -386,6 +392,8 @@ static void RunIntf( intf_thread_t *p_intf )
else else
i++; i++;
var_Set( p_input, "spu-es", list.p_list->p_values[i] ); var_Set( p_input, "spu-es", list.p_list->p_values[i] );
var_Change( p_input, "spu-es", VLC_VAR_FREELIST,
&list, &list2 );
vlc_object_release( p_input ); vlc_object_release( p_input );
} }
break; break;
......
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