Commit 98e9da7b authored by Rémi Duraffort's avatar Rémi Duraffort

Fix memleak in sdl video output. (string passed to setenv have to be freed after).

parent 97c14e4c
...@@ -181,7 +181,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -181,7 +181,7 @@ static int Open ( vlc_object_t *p_this )
p_vout->pf_control = NULL; p_vout->pf_control = NULL;
#ifdef HAVE_SETENV #ifdef HAVE_SETENV
psz_method = config_GetPsz( p_vout, "vout" ); char* psz = psz_method = config_GetPsz( p_vout, "vout" );
if( psz_method ) if( psz_method )
{ {
while( *psz_method && *psz_method != ':' ) while( *psz_method && *psz_method != ':' )
...@@ -194,6 +194,7 @@ static int Open ( vlc_object_t *p_this ) ...@@ -194,6 +194,7 @@ static int Open ( vlc_object_t *p_this )
setenv( "SDL_VIDEODRIVER", psz_method + 1, 1 ); setenv( "SDL_VIDEODRIVER", psz_method + 1, 1 );
} }
} }
free( psz );
#endif #endif
/* Initialize library */ /* Initialize library */
......
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