Patch for some leaks submitted to bugzilla 149713



Hi,

I just submitted a patch to plug some leaks in the gnome-2-6 branch. It
is attached to bug 149713, and to this email.

Regards,
Thomas.

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.6194.2.12
diff -u -r1.6194.2.12 ChangeLog
--- ChangeLog	25 Jun 2004 20:32:04 -0000	1.6194.2.12
+++ ChangeLog	9 Aug 2004 11:06:40 -0000
@@ -1,3 +1,11 @@
+2004-08-09  Thomas Cataldo  <thomas cataldo aliacom fr>
+
+	Some memory leak fixes	
+	
+	* libnautilus-private/nautilus-icon-factory.c:
+	(nautilus_icon_factory_instance_init), (create_normal_cache_icon):
+	* libnautilus-private/nautilus-module.c: (load_module_dir):
+
 2004-06-25  Sebastien Bacher  <seb128 debian org>
 
         * libnautilus-private/nautilus-icon-container.c:
Index: libnautilus-private/nautilus-icon-factory.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-icon-factory.c,v
retrieving revision 1.305
diff -u -r1.305 nautilus-icon-factory.c
--- libnautilus-private/nautilus-icon-factory.c	22 Apr 2004 06:29:02 -0000	1.305
+++ libnautilus-private/nautilus-icon-factory.c	9 Aug 2004 11:06:47 -0000
@@ -374,6 +374,8 @@
 	
 	factory->fallback_icon = cache_icon_new (pixbuf, NULL, 1.0, 1.0);
 
+	g_object_unref(pixbuf);
+
 	factory->image_mime_types = g_hash_table_new (g_str_hash, g_str_equal);
 	for (i = 0; i < G_N_ELEMENTS (types); i++) {
 		g_hash_table_insert (factory->image_mime_types,
@@ -1187,7 +1189,7 @@
 		 *        before the extension */
 		if (stat (icon, &statbuf) == 0 &&
 		    S_ISREG (statbuf.st_mode)) {
-			filename = g_strdup (icon);
+			filename = icon;
 			mtime = statbuf.st_mtime;
 		}
 	} else {
Index: libnautilus-private/nautilus-module.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-module.c,v
retrieving revision 1.2
diff -u -r1.2 nautilus-module.c
--- libnautilus-private/nautilus-module.c	11 Jan 2004 20:34:32 -0000	1.2
+++ libnautilus-private/nautilus-module.c	9 Aug 2004 11:06:48 -0000
@@ -197,6 +197,7 @@
 							     name, 
 							     NULL);
 				nautilus_module_load_file (filename);
+				g_free (filename);
 			}
 		}
 


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