]> git.sesse.net Git - vlc/commitdiff
Win32: fix memleak
authorJean-Baptiste Kempf <jb@videolan.org>
Tue, 15 Jun 2010 23:52:17 +0000 (01:52 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Tue, 15 Jun 2010 23:52:17 +0000 (01:52 +0200)
src/win32/specific.c

index 24f1a749b6cd30abab03f442b742d3a7d3878810..1436c9363b362828ec4f566384c00c65b9983c2f 100644 (file)
@@ -349,7 +349,9 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
                 {
                     i_options++;
                 }
-                playlist_AddExt( p_playlist, make_URI( ppsz_argv[i_opt] ),
+
+                char *psz_URI = make_URI( ppsz_argv[i_opt] );
+                playlist_AddExt( p_playlist, psz_URI,
                         NULL, PLAYLIST_APPEND |
                         ( ( i_opt || p_data->enqueue ) ? 0 : PLAYLIST_GO ),
                         PLAYLIST_END, -1,
@@ -359,6 +361,7 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
                         true, pl_Unlocked );
 
                 i_opt += i_options;
+                free( psz_URI );
             }
 
             free( ppsz_argv );