_pixman_create_source_image() - check for malloc failure

Fix an unchecked malloc by propagating the NULL pointer up to its callers,
which were already checking for failures.
This commit is contained in:
Chris Wilson 2007-04-09 16:24:11 +01:00 committed by Carl Worth
parent d0745c08b7
commit f53c2b418c

View file

@ -191,6 +191,8 @@ _pixman_create_source_image (void)
pixman_image_t *image;
image = (pixman_image_t *) malloc (sizeof (pixman_image_t));
if (image == NULL)
return NULL;
image->pDrawable = NULL;
image->pixels = NULL;
image->format_code = PICT_a8r8g8b8;