]> git.sesse.net Git - vlc/commitdiff
Delete arrays ith delete[] and fix memleak.
authorRémi Duraffort <ivoire@videolan.org>
Tue, 19 Aug 2008 21:09:03 +0000 (23:09 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Tue, 19 Aug 2008 21:09:03 +0000 (23:09 +0200)
projects/mozilla/vlcplugin.cpp

index bd9adc00c5d76dc1b5a0fd7a9947206765d44303..e1bd8eff64b95fb7d890b184aeac57c0a7ad58ab 100644 (file)
@@ -246,7 +246,7 @@ NPError VlcPlugin::init(int argc, char* const argn[], char* const argv[])
 
 VlcPlugin::~VlcPlugin()
 {
-    delete psz_baseURL;
+    delete[] psz_baseURL;
     delete psz_target;
     if( libvlc_log )
         libvlc_log_close(libvlc_log, NULL);
@@ -340,6 +340,7 @@ relativeurl:
                     if( '/' != *href )
                     {
                         /* baseURL is not an absolute path */
+                        delete[] href;
                         return NULL;
                     }
                     pathstart = href;