summaryrefslogtreecommitdiff
path: root/src/cairo-type1-fallback.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2007-04-08 21:36:42 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2007-04-09 15:07:27 +0100
commita34a32fd99145733df9290f7c72bf7d9759e212b (patch)
treea111b95cc334b313372232cbba3a65f89f59592f /src/cairo-type1-fallback.c
parentd2efadc84d0716498cec0510916f5375fbb7acf0 (diff)
downloadcairo-a34a32fd99145733df9290f7c72bf7d9759e212b.tar.gz
cairo-type1-fallback - check for an error during cleanup
The cleanup path is shared between the error path and the true path, and so any error along it can not be ignored.
Diffstat (limited to 'src/cairo-type1-fallback.c')
-rw-r--r--src/cairo-type1-fallback.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cairo-type1-fallback.c b/src/cairo-type1-fallback.c
index a183b28b4..eef0d73e4 100644
--- a/src/cairo-type1-fallback.c
+++ b/src/cairo-type1-fallback.c
@@ -558,6 +558,7 @@ cairo_type1_font_write_private_dict (cairo_type1_font_t *font,
const char *name)
{
cairo_int_status_t status;
+ cairo_status_t status2;
cairo_output_stream_t *encrypted_output;
font->eexec_key = CAIRO_TYPE1_PRIVATE_DICT_KEY;
@@ -597,10 +598,10 @@ cairo_type1_font_write_private_dict (cairo_type1_font_t *font,
"dup /FontName get exch definefont pop\n"
"mark currentfile closefile\n");
- if (status == CAIRO_STATUS_SUCCESS)
- status = _cairo_output_stream_get_status (encrypted_output);
fail:
- _cairo_output_stream_destroy (encrypted_output);
+ status2 = _cairo_output_stream_destroy (encrypted_output);
+ if (status == CAIRO_STATUS_SUCCESS)
+ status = status2;
return status;
}