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)
This commit is contained in:
Matthias Clasen 2005-01-23 04:35:09 +00:00 committed by Matthias Clasen
parent a7f083932d
commit a66dd6b37d
2 changed files with 10 additions and 1 deletions

View File

@ -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

View File

@ -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;
}