Commit b82579c0 authored by Rémi Duraffort's avatar Rémi Duraffort Committed by Jean-Baptiste Kempf

rc: fix some memory leaks.

(cherry picked from commit 0813e08f)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 55c7a24d
...@@ -1197,9 +1197,8 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1197,9 +1197,8 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd,
} }
var_FreeList( &val, &text ); var_FreeList( &val, &text );
msg_rc( "+----[ end of %s ]", val_name.psz_string ); msg_rc( "+----[ end of %s ]", val_name.psz_string );
free( val_name.psz_string );
} }
free( val_name.psz_string );
} }
out: out:
vlc_object_release( p_input ); vlc_object_release( p_input );
...@@ -1724,6 +1723,7 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1724,6 +1723,7 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd,
if ( var_Get( p_aout, psz_variable, &val ) < 0 ) if ( var_Get( p_aout, psz_variable, &val ) < 0 )
{ {
vlc_object_release( p_aout ); vlc_object_release( p_aout );
free( val_name.psz_string );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
i_value = val.i_int; i_value = val.i_int;
...@@ -1732,6 +1732,7 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1732,6 +1732,7 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd,
VLC_VAR_GETLIST, &val, &text ) < 0 ) VLC_VAR_GETLIST, &val, &text ) < 0 )
{ {
vlc_object_release( p_aout ); vlc_object_release( p_aout );
free( val_name.psz_string );
return VLC_EGENERIC; return VLC_EGENERIC;
} }
...@@ -1748,7 +1749,6 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1748,7 +1749,6 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd,
var_FreeList( &val, &text ); var_FreeList( &val, &text );
msg_rc( "+----[ end of %s ]", val_name.psz_string ); msg_rc( "+----[ end of %s ]", val_name.psz_string );
free( val_name.psz_string );
i_error = VLC_SUCCESS; i_error = VLC_SUCCESS;
} }
else else
...@@ -1758,6 +1758,7 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1758,6 +1758,7 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd,
i_error = var_Set( p_aout, psz_variable, val ); i_error = var_Set( p_aout, psz_variable, val );
} }
free( val_name.psz_string );
vlc_object_release( p_aout ); vlc_object_release( p_aout );
return i_error; return i_error;
......
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