]> git.sesse.net Git - vlc/commitdiff
mozilla: fix small memory leak
authorJean-Paul Saman <jpsaman@videolan.org>
Mon, 1 Jun 2009 14:08:40 +0000 (16:08 +0200)
committerJean-Paul Saman <jpsaman@videolan.org>
Fri, 24 Jul 2009 12:26:28 +0000 (14:26 +0200)
(cherry picked from commit 63ae92da20faa6dafa8fa4dc808bb27ad2bcb455)

projects/mozilla/control/npolibvlc.cpp

index 39e4f440faaf84cfaf0ec47ce9ccfd952e3d0663..f9045098a63ae41645245a1ed7f05d771c3d6db6 100644 (file)
@@ -1008,7 +1008,7 @@ void LibvlcPlaylistNPObject::parseOptions(const NPString &nps,
                             if( ! moreOptions )
                             {
                                 /* failed to allocate more memory */
-                               free(s);
+                                free(s);
                                 /* return what we got so far */
                                 *i_options = nOptions;
                                 *ppsz_options = options;
@@ -1085,6 +1085,7 @@ void LibvlcPlaylistNPObject::parseOptions(NPObject *obj, int *i_options,
                     }
 
                     options[nOptions++] = stringValue(value);
+                    NPN_ReleaseVariantValue(&value);
                 }
                 *i_options = nOptions;
                 *ppsz_options = options;