Fix memory leaks in error paths

svn path=/trunk/; revision=17165
This commit is contained in:
Matthias Clasen 2007-01-17 04:24:00 +00:00
parent 18cc703fa4
commit 5a119668b1
2 changed files with 8 additions and 10 deletions

View File

@ -1,3 +1,10 @@
2007-01-16 Matthias Clasen <mclasen@redhat.com>
* gdk-pixbuf-loader.c (gdk_pixbuf_loader_write): Just
call gdk_pixbuf_loader_close to close the loader in
the error case. Fixes memory leaks in the error case,
pointed out by David Necas.
2007-01-04 Matthias Clasen <mclasen@redhat.com>
* io-bmp.c (OneLine32): Fix a warning

View File

@ -472,16 +472,7 @@ gdk_pixbuf_loader_write (GdkPixbufLoader *loader,
fail:
gdk_pixbuf_loader_ensure_error (loader, error);
priv->closed = TRUE;
if (priv->image_module && priv->holds_threadlock)
{
_gdk_pixbuf_unlock (priv->image_module);
priv->holds_threadlock = FALSE;
}
g_signal_emit (loader, pixbuf_loader_signals[CLOSED], 0);
gdk_pixbuf_loader_close (loader, NULL);
return FALSE;
}