Commit a66dd6b3 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen
Browse files

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)
parent a7f08393
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> 2005-01-12 Owen Taylor <otaylor@redhat.com>
* Makefile.am: Use grep | head -n 1 instead of grep -m 1 * Makefile.am: Use grep | head -n 1 instead of grep -m 1
......
...@@ -564,6 +564,7 @@ gdk_pixbuf_loader_new_with_type (const char *image_type, ...@@ -564,6 +564,7 @@ gdk_pixbuf_loader_new_with_type (const char *image_type,
if (tmp != NULL) if (tmp != NULL)
{ {
g_propagate_error (error, tmp); g_propagate_error (error, tmp);
gdk_pixbuf_loader_close (retval, NULL);
g_object_unref (retval); g_object_unref (retval);
return NULL; return NULL;
} }
...@@ -619,10 +620,11 @@ gdk_pixbuf_loader_new_with_mime_type (const char *mime_type, ...@@ -619,10 +620,11 @@ gdk_pixbuf_loader_new_with_mime_type (const char *mime_type,
retval = g_object_new (GDK_TYPE_PIXBUF_LOADER, NULL); retval = g_object_new (GDK_TYPE_PIXBUF_LOADER, NULL);
tmp = NULL; tmp = NULL;
gdk_pixbuf_loader_load_module(retval, image_type, &tmp); gdk_pixbuf_loader_load_module (retval, image_type, &tmp);
if (tmp != NULL) if (tmp != NULL)
{ {
g_propagate_error (error, tmp); g_propagate_error (error, tmp);
gdk_pixbuf_loader_close (retval, NULL);
g_object_unref (retval); g_object_unref (retval);
return NULL; return NULL;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment