summaryrefslogtreecommitdiff
path: root/src/cairo-type1-fallback.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-03-31 10:36:08 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-03-31 12:16:02 +0100
commit8362c6f726979abc43ad9f7303bd45fcb03f83b3 (patch)
tree1d5453999da1645702a563f678efdd50d6836d17 /src/cairo-type1-fallback.c
parent88956cd42e9cc03cb8b4ec730062993eaaf3938d (diff)
downloadcairo-8362c6f726979abc43ad9f7303bd45fcb03f83b3.tar.gz
[type1] Fixup error path during write_charstrings()
On the common error path we attempted to unlock a mutex that was not always held, so reorder the error paths appropriately.
Diffstat (limited to 'src/cairo-type1-fallback.c')
-rw-r--r--src/cairo-type1-fallback.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cairo-type1-fallback.c b/src/cairo-type1-fallback.c
index 2b6768dc0..1023bbdcb 100644
--- a/src/cairo-type1-fallback.c
+++ b/src/cairo-type1-fallback.c
@@ -449,14 +449,14 @@ cairo_type1_font_write_charstrings (cairo_type1_font_t *font,
/* four "random" bytes required by encryption algorithm */
status = _cairo_array_append_multiple (&data, zeros, 4);
if (unlikely (status))
- goto fail;
+ break;
status = cairo_type1_font_create_charstring (font, i,
font->scaled_font_subset->glyphs[i],
CAIRO_CHARSTRING_TYPE1,
&data);
if (unlikely (status))
- goto fail;
+ break;
charstring_encrypt (&data);
length = _cairo_array_num_elements (&data);
@@ -474,9 +474,9 @@ cairo_type1_font_write_charstrings (cairo_type1_font_t *font,
length);
_cairo_output_stream_printf (encrypted_output, " ND\n");
}
+ _cairo_scaled_font_thaw_cache (font->type1_scaled_font);
fail:
- _cairo_scaled_font_thaw_cache (font->type1_scaled_font);
_cairo_array_fini (&data);
return status;
}