# HG changeset patch # User Daniel Atallah # Date 1193714647 0 # Node ID a0b0f988667e9614df531f77d2230895250aa066 # Parent 901b3e13c633a80656bd322b0b9a2d1bcb60e6ec Fix some leaks caused by GdkPixbufLoaders not being disposed of. diff -r 901b3e13c633 -r a0b0f988667e pidgin/gtkaccount.c --- a/pidgin/gtkaccount.c Tue Oct 30 03:20:13 2007 +0000 +++ b/pidgin/gtkaccount.c Tue Oct 30 03:24:07 2007 +0000 @@ -212,6 +212,9 @@ purple_imgstore_get_size(dialog->icon_img), NULL); gdk_pixbuf_loader_close(loader, NULL); pixbuf = gdk_pixbuf_loader_get_pixbuf(loader); + if (pixbuf) + g_object_ref(pixbuf); + g_object_unref(loader); } if (pixbuf && dialog->prpl_info && @@ -2056,8 +2059,9 @@ if (buddyicon_pixbuf != NULL) { buddyicon = gdk_pixbuf_scale_simple(buddyicon_pixbuf, 22, 22, GDK_INTERP_HYPER); - g_object_unref(G_OBJECT(buddyicon_pixbuf)); } + + g_object_unref(loader); } gtk_list_store_set(store, iter, diff -r 901b3e13c633 -r a0b0f988667e pidgin/gtkrequest.c --- a/pidgin/gtkrequest.c Tue Oct 30 03:20:13 2007 +0000 +++ b/pidgin/gtkrequest.c Tue Oct 30 03:24:07 2007 +0000 @@ -931,7 +931,7 @@ purple_request_field_image_get_scale_y(field) * gdk_pixbuf_get_height(buf), GDK_INTERP_BILINEAR); widget = gtk_image_new_from_pixbuf(scale); - g_object_unref(G_OBJECT(buf)); + g_object_unref(G_OBJECT(loader)); g_object_unref(G_OBJECT(scale)); return widget; diff -r 901b3e13c633 -r a0b0f988667e pidgin/gtkstatusbox.c --- a/pidgin/gtkstatusbox.c Tue Oct 30 03:20:13 2007 +0000 +++ b/pidgin/gtkstatusbox.c Tue Oct 30 03:24:07 2007 +0000 @@ -2162,6 +2162,9 @@ purple_imgstore_get_size(status_box->buddy_icon_img), NULL); gdk_pixbuf_loader_close(loader, NULL); status_box->buddy_icon = gdk_pixbuf_loader_get_pixbuf(loader); + if (status_box->buddy_icon) + g_object_ref(status_box->buddy_icon); + g_object_unref(loader); } if (status_box->buddy_icon == NULL)