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.
This commit is contained in:
committed by
Federico Mena Quintero
parent
1c39be5abb
commit
0075b342e9
@@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
||||
2002-09-27 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* io-bmp.c (OneLine): Fix the update region notification to handle
|
||||
|
||||
@@ -493,6 +493,7 @@ gdk_pixbuf__ico_image_begin_load(ModulePreparedNotifyFunc prepared_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,
|
||||
|
||||
Reference in New Issue
Block a user