mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 02:58:02 +02:00
_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:
parent
d0745c08b7
commit
f53c2b418c
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue