gjs r90 - in trunk: gjs test



Author: tko
Date: Wed Nov 12 10:46:34 2008
New Revision: 90
URL: http://svn.gnome.org/viewvc/gjs?rev=90&view=rev

Log:
fix memory leak

	* gjs/importer.c (do_import): fix memory leak
	* test/gjs.supp: remove the leak from suppressions

Modified:
   trunk/gjs/importer.c
   trunk/test/gjs.supp

Modified: trunk/gjs/importer.c
==============================================================================
--- trunk/gjs/importer.c	(original)
+++ trunk/gjs/importer.c	Wed Nov 12 10:46:34 2008
@@ -393,6 +393,9 @@
             goto out;
         }
 
+        g_free(dirname);
+        dirname = NULL;
+
         if (!gjs_string_to_utf8(context, elem, &dirname))
             goto out; /* Error message already set */
 

Modified: trunk/test/gjs.supp
==============================================================================
--- trunk/test/gjs.supp	(original)
+++ trunk/test/gjs.supp	Wed Nov 12 10:46:34 2008
@@ -24,23 +24,6 @@
 }
 
 {
-   importer_new_resolve string never freed
-   Memcheck:Leak
-   fun:malloc
-   fun:g_malloc
-   fun:g_utf16_to_utf8
-   fun:gjs_string_to_utf8
-   fun:importer_new_resolve
-   obj:/usr/lib/xulrunner*/libmozjs.so
-   obj:/usr/lib/xulrunner*/libmozjs.so
-   obj:/usr/lib/xulrunner*/libmozjs.so
-   obj:/usr/lib/xulrunner*/libmozjs.so
-   fun:JS_EvaluateUCScriptForPrincipals
-   fun:JS_EvaluateUCScript
-   fun:JS_EvaluateScript
-}
-
-{
    xulrunner internal allocations never freed
    Memcheck:Leak
    fun:malloc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]