From: RĂ©mi Duraffort Date: Thu, 31 Jul 2008 12:38:49 +0000 (+0200) Subject: Fix memleak in sdl video output. (string passed to setenv have to be freed after). X-Git-Tag: 0.9.0-test3~116 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=98e9da7b1a9f9d4475189985ad21b1aad0c1d550;p=vlc Fix memleak in sdl video output. (string passed to setenv have to be freed after). --- diff --git a/modules/video_output/sdl.c b/modules/video_output/sdl.c index cfd012dfb6..0bc7de17d5 100644 --- a/modules/video_output/sdl.c +++ b/modules/video_output/sdl.c @@ -181,7 +181,7 @@ static int Open ( vlc_object_t *p_this ) p_vout->pf_control = NULL; #ifdef HAVE_SETENV - psz_method = config_GetPsz( p_vout, "vout" ); + char* psz = psz_method = config_GetPsz( p_vout, "vout" ); if( psz_method ) { while( *psz_method && *psz_method != ':' ) @@ -194,6 +194,7 @@ static int Open ( vlc_object_t *p_this ) setenv( "SDL_VIDEODRIVER", psz_method + 1, 1 ); } } + free( psz ); #endif /* Initialize library */