diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2007-10-04 00:38:12 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2007-10-04 00:42:30 +0100 |
commit | 8ad56b308ae8bbecfe9873c21551a6d4b2302420 (patch) | |
tree | a9c8791e8c30f70fc24a1b1ade069e54c23d98be /src/cairo-paginated-surface.c | |
parent | 66664596559c55913fb0b9c8784fe8ab862c217b (diff) |
[malloc/error] Add call to _cairo_error() after a failed malloc.
Blitz all allocations to ensure that they raise a
_cairo_error(CAIRO_STATUS_NO_MEMORY) on failure.
Diffstat (limited to 'src/cairo-paginated-surface.c')
-rw-r--r-- | src/cairo-paginated-surface.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo-paginated-surface.c b/src/cairo-paginated-surface.c index 007cc89e..76eb6616 100644 --- a/src/cairo-paginated-surface.c +++ b/src/cairo-paginated-surface.c @@ -76,8 +76,10 @@ _cairo_paginated_surface_create (cairo_surface_t *target, cairo_paginated_surface_t *surface; surface = malloc (sizeof (cairo_paginated_surface_t)); - if (surface == NULL) + if (surface == NULL) { + _cairo_error (CAIRO_STATUS_NO_MEMORY); goto FAIL; + } _cairo_surface_init (&surface->base, &cairo_paginated_surface_backend, content); |