mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-26 20:30:11 +01:00
cairo-pdf-surface: Close memory leak during OOM handling.
This fixes bug #6186: Memory leak in emit_image_rgb_data (src/cairo-pdf-surface.c) https://bugs.freedesktop.org/show_bug.cgi?id=6186
This commit is contained in:
parent
25cccaaa1f
commit
fc51a78a1e
1 changed files with 3 additions and 1 deletions
|
|
@ -654,8 +654,10 @@ emit_image_rgb_data (cairo_pdf_document_t *document,
|
|||
opaque = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
|
||||
image->width,
|
||||
image->height);
|
||||
if (opaque->status)
|
||||
if (opaque->status) {
|
||||
free (rgb);
|
||||
return 0;
|
||||
}
|
||||
|
||||
_cairo_pattern_init_for_surface (&pattern.surface, &image->base);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue