gdk-pixbuf memory allocation



I just checked in this patch to gdk-pixbuf:

Index: io-xpm.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk-pixbuf/io-xpm.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- io-xpm.c	2001/01/22 23:09:43	1.25
+++ io-xpm.c	2001/02/07 11:37:05	1.26
@@ -1229,7 +1229,7 @@ mem_buffer (enum buf_op op, gpointer han
 static void
 free_buffer (guchar *pixels, gpointer data)
 {
-	free (pixels);
+	g_free (pixels);
 }

 /* This function does all the work. */

Since havoc changed malloc -> g_try_malloc, and timj turned on the
profiler allocator in testgtk this crashed in testgtk.

Now some loaders use malloc, and some g_try_malloc. This is very
confusing. I think all loaders should use g_try_malloc. Shall i do this?

/ Alex






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