]> git.sesse.net Git - vlc/blobdiff - modules/video_output/sdl.c
Fix memleak in sdl video output. (string passed to setenv have to be freed after).
[vlc] / modules / video_output / sdl.c
index f39a58c744d13687809819dd5e6858a91661d223..0bc7de17d5a14157aef0ac80fd7f454adaded16d 100644 (file)
@@ -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 */
@@ -517,7 +518,7 @@ static int Manage( vout_thread_t *p_vout )
                 if( p_playlist != NULL )
                 {
                     playlist_Stop( p_playlist );
-                    pl_Release( p_playlist );
+                    pl_Release( p_vout );
                 }
 #else
 #warning FIXME FIXME ?