[Cairo] Fix Kona defect & Svace issue 54/131954/1 accepted/tizen/unified/20170609.053351 submit/tizen/20170607.021832
authorMoonhee Choi <mh0310.choi@samsung.com>
Wed, 31 May 2017 09:44:08 +0000 (18:44 +0900)
committerMoonhee Choi <mh0310.choi@samsung.com>
Wed, 31 May 2017 09:44:08 +0000 (18:44 +0900)
 - 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
src/cairo-pdf-surface.c

index 575096a..de3cee7 100644 (file)
@@ -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;
 }
 
index 0412808..e1612b2 100644 (file)
@@ -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",