summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cairo-gl-operand.c2
-rw-r--r--src/cairo-pdf-surface.c6
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",