[Nautilus-list] Leak



There is a leak in src/nautilus-complex-search-bar.c:

Index: nautilus-complex-search-bar.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-complex-search-bar.c,v
retrieving revision 1.50.2.1
retrieving revision 1.50.2.2
diff -u -p -r1.50.2.1 -r1.50.2.2
--- nautilus-complex-search-bar.c	2001/07/25 19:41:51	1.50.2.1
+++ nautilus-complex-search-bar.c	2001/07/30 19:19:09	1.50.2.2
@@ -454,12 +454,19 @@ load_find_them_pixmap_widget (void)
 	GdkPixbuf *pixbuf;
 	GdkPixmap *pixmap;
 	GdkBitmap *mask;
+	GtkWidget *widget;
 	
 	pixbuf = gdk_pixbuf_new_from_file (NAUTILUS_PIXMAPDIR "/search.png");
 	if (pixbuf != NULL) {
 		gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pixmap, &mask, EEL_STANDARD_ALPHA_THRESHHOLD);
 		gdk_pixbuf_unref (pixbuf);
-		return gtk_pixmap_new (pixmap, mask);
+
+		widget = gtk_pixmap_new (pixmap, mask);
+
+		gdk_pixmap_unref (pixmap);
+		gdk_pixmap_unref (mask);
+
+		return widget;
 	} else {
 		return NULL;
 	}


Can i apply this?

/ Alex






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