From 4d9e2b04057fab1e18c4b0ddb948d87fb045c28b Mon Sep 17 00:00:00 2001 From: Moonhee Choi Date: Wed, 31 May 2017 18:44:08 +0900 Subject: [PATCH] [Cairo] Fix Kona defect & Svace issue - Kona RQ170526-01074 - warning : passing argument of 'cairo_surface_destory' from incompatible pointer type (cairo-gl-operand.c) - Svace 171678 related to memory leak (cairo-pdf-surface.c) Change-Id: If5b06985ad3be89ef639bfa1cbb07002304ea3d7 --- src/cairo-gl-operand.c | 2 +- src/cairo-pdf-surface.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cairo-gl-operand.c b/src/cairo-gl-operand.c index 575096a84..de3cee725 100644 --- a/src/cairo-gl-operand.c +++ b/src/cairo-gl-operand.c @@ -833,7 +833,7 @@ _cairo_gl_pattern_texture_setup (cairo_gl_operand_t *operand, fail: cairo_surface_destroy (&surface->base); - cairo_surface_destroy (image); + cairo_surface_destroy (&image->base); return status; } diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 04128081c..e1612b231 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -5497,8 +5497,10 @@ _cairo_pdf_surface_emit_truetype_font_subset (cairo_pdf_surface_t *surface, char *pdf_str; status = _utf8_to_pdf_string (subset.family_name_utf8, &pdf_str); - if (unlikely (status)) - return status; + if (unlikely (status)) { + _cairo_truetype_subset_fini (&subset); + return status; + } _cairo_output_stream_printf (surface->output, " /FontFamily %s\n", -- 2.34.1