summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-ico.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2002-09-27 22:06:47 +0000
committerFederico Mena Quintero <federico@src.gnome.org>2002-09-27 22:06:47 +0000
commit743a039cd14ca7e94f2211aa516112890444a3eb (patch)
treed540f38c87bcdce8990e81950421c815498fc286 /gdk-pixbuf/io-ico.c
parent8cec022f3f36323de511bea79f5a16c785584c14 (diff)
downloadgtk+-743a039cd14ca7e94f2211aa516112890444a3eb.tar.gz
Free the context if we cannot allocate the HeaderBuf.
2002-09-27 Federico Mena Quintero <federico@ximian.com> * io-ico.c (gdk_pixbuf__ico_image_begin_load): Free the context if we cannot allocate the HeaderBuf.
Diffstat (limited to 'gdk-pixbuf/io-ico.c')
-rw-r--r--gdk-pixbuf/io-ico.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdk-pixbuf/io-ico.c b/gdk-pixbuf/io-ico.c
index cb291dd13f..d54e4103e4 100644
--- a/gdk-pixbuf/io-ico.c
+++ b/gdk-pixbuf/io-ico.c
@@ -458,6 +458,7 @@ gdk_pixbuf__ico_image_begin_load(ModuleSizeFunc size_func,
context->HeaderSize = 54;
context->HeaderBuf = g_try_malloc(14 + 40 + 4*256 + 512);
if (!context->HeaderBuf) {
+ g_free (context);
g_set_error (error,
GDK_PIXBUF_ERROR,
GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY,