# HG changeset patch # User Tim Ringenbach # Date 1087861796 0 # Node ID b726aba282296409a87f69fa8a14bfe0b32e7ab9 # Parent b2f102b8abf159c1dd37ab6c7db5ac7119c5ecc5 [gaim-migrate @ 10143] This should either fix some leaks, or crash. Looks like it doesn't crash. Someone read the documentation for gdk_pixbuf_loader_get_pixbuf and explain to me how it doesn't say to do things that why that I was doing them that was apparently leaking. Oh and thanks to nosnilmot, or just submitted a patch that uses gdk_pixbuf_loader without leaking, giving me an example of how it should be done. committer: Tailor Script diff -r b2f102b8abf1 -r b726aba28229 src/gtkblist.c --- a/src/gtkblist.c Mon Jun 21 23:42:05 2004 +0000 +++ b/src/gtkblist.c Mon Jun 21 23:49:56 2004 +0000 @@ -2656,8 +2656,7 @@ data = gaim_buddy_icon_get_data(icon, &len); gdk_pixbuf_loader_write(loader, data, len, NULL); buf = gdk_pixbuf_loader_get_pixbuf(loader); - if (buf) - g_object_ref(G_OBJECT(buf)); + gdk_pixbuf_loader_close(loader, NULL); diff -r b2f102b8abf1 -r b726aba28229 src/gtkimhtml.c --- a/src/gtkimhtml.c Mon Jun 21 23:42:05 2004 +0000 +++ b/src/gtkimhtml.c Mon Jun 21 23:49:56 2004 +0000 @@ -3740,8 +3740,7 @@ GdkPixbufLoader *loader = gdk_pixbuf_loader_new(); gdk_pixbuf_loader_write(loader, data, len, NULL); pixbuf = gdk_pixbuf_loader_get_pixbuf(loader); - if (pixbuf) - g_object_ref(G_OBJECT(pixbuf)); + gdk_pixbuf_loader_close(loader, NULL); }