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:
Federico Mena Quintero 2002-09-27 22:06:47 +00:00 committed by Federico Mena Quintero
parent 8cec022f3f
commit 743a039cd1
2 changed files with 6 additions and 0 deletions

View File

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

View File

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