summaryrefslogtreecommitdiff
path: root/gdk-pixbuf
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-01-23 04:35:09 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-01-23 04:35:09 +0000
commita66dd6b37d816144dd89de0e28ebb72e298d5c5d (patch)
tree6a777eba6badbd0f5ec03ca6cdc3d1177ddc9ee0 /gdk-pixbuf
parenta7f083932d413ada67a3cd8b638f8e3cd74cfcca (diff)
downloadgdk-pixbuf-a66dd6b37d816144dd89de0e28ebb72e298d5c5d.tar.gz
Close the loader before unreffing it in the error case. (#164915, Crispin
2005-01-22 Matthias Clasen <mclasen@redhat.com> * gdk-pixbuf-loader.c (gdk_pixbuf_loader_new_with_type) (gdk_pixbuf_loader_new_with_mime_type): Close the loader before unreffing it in the error case. (#164915, Crispin Flowerday)
Diffstat (limited to 'gdk-pixbuf')
-rw-r--r--gdk-pixbuf/ChangeLog7
-rw-r--r--gdk-pixbuf/gdk-pixbuf-loader.c4
2 files changed, 10 insertions, 1 deletions
diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog
index db00ecc44..aba989854 100644
--- a/gdk-pixbuf/ChangeLog
+++ b/gdk-pixbuf/ChangeLog
@@ -1,3 +1,10 @@
+2005-01-22 Matthias Clasen <mclasen@redhat.com>
+
+ * gdk-pixbuf-loader.c (gdk_pixbuf_loader_new_with_type)
+ (gdk_pixbuf_loader_new_with_mime_type): Close the loader
+ before unreffing it in the error case. (#164915, Crispin
+ Flowerday)
+
2005-01-12 Owen Taylor <otaylor@redhat.com>
* Makefile.am: Use grep | head -n 1 instead of grep -m 1
diff --git a/gdk-pixbuf/gdk-pixbuf-loader.c b/gdk-pixbuf/gdk-pixbuf-loader.c
index 9e252c570..bccee9fc7 100644
--- a/gdk-pixbuf/gdk-pixbuf-loader.c
+++ b/gdk-pixbuf/gdk-pixbuf-loader.c
@@ -564,6 +564,7 @@ gdk_pixbuf_loader_new_with_type (const char *image_type,
if (tmp != NULL)
{
g_propagate_error (error, tmp);
+ gdk_pixbuf_loader_close (retval, NULL);
g_object_unref (retval);
return NULL;
}
@@ -619,10 +620,11 @@ gdk_pixbuf_loader_new_with_mime_type (const char *mime_type,
retval = g_object_new (GDK_TYPE_PIXBUF_LOADER, NULL);
tmp = NULL;
- gdk_pixbuf_loader_load_module(retval, image_type, &tmp);
+ gdk_pixbuf_loader_load_module (retval, image_type, &tmp);
if (tmp != NULL)
{
g_propagate_error (error, tmp);
+ gdk_pixbuf_loader_close (retval, NULL);
g_object_unref (retval);
return NULL;
}