From 98e9da7b1a9f9d4475189985ad21b1aad0c1d550 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Thu, 31 Jul 2008 14:38:49 +0200 Subject: [PATCH] Fix memleak in sdl video output. (string passed to setenv have to be freed after). --- modules/video_output/sdl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ -- 2.39.2