[vlc-devel] commit: mozilla: fix small memory leak (Jean-Paul Saman )
git version control
git at videolan.org
Fri Jul 24 14:28:34 CEST 2009
vlc | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Mon Jun 1 16:08:40 2009 +0200| [f4fef7ff6dff634a315a762f4b1b75abcc432b30] | committer: Jean-Paul Saman
mozilla: fix small memory leak
(cherry picked from commit 63ae92da20faa6dafa8fa4dc808bb27ad2bcb455)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f4fef7ff6dff634a315a762f4b1b75abcc432b30
---
projects/mozilla/control/npolibvlc.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/projects/mozilla/control/npolibvlc.cpp b/projects/mozilla/control/npolibvlc.cpp
index 39e4f44..f904509 100644
--- a/projects/mozilla/control/npolibvlc.cpp
+++ b/projects/mozilla/control/npolibvlc.cpp
@@ -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;
More information about the vlc-devel
mailing list