[vlc-commits] commit: Win32: fix memleak (Jean-Baptiste Kempf )

git at videolan.org git at videolan.org
Wed Jun 16 01:52:45 CEST 2010


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jun 16 01:52:17 2010 +0200| [2e959033fffa317c99c45b1d7926851e33fe3b1a] | committer: Jean-Baptiste Kempf 

Win32: fix memleak

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2e959033fffa317c99c45b1d7926851e33fe3b1a
---

 src/win32/specific.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/win32/specific.c b/src/win32/specific.c
index 24f1a74..1436c93 100644
--- a/src/win32/specific.c
+++ b/src/win32/specific.c
@@ -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 );



More information about the vlc-commits mailing list