diff options
author | Robin Watts <robin.watts@artifex.com> | 2018-06-22 18:04:10 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2018-06-22 18:07:59 +0100 |
commit | 627e65b79ea402f7a6127cf0a608d56f851999f7 (patch) | |
tree | 9d11271a0f91aa95bfc5ef2df5289667c875d9cf /source | |
parent | 15c54ec8241c224b39793f2e73b75c9832636a6f (diff) | |
download | mupdf-627e65b79ea402f7a6127cf0a608d56f851999f7.tar.xz |
Avoid leaking reference to "form" object.
Diffstat (limited to 'source')
-rw-r--r-- | source/pdf/pdf-xobject.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/pdf/pdf-xobject.c b/source/pdf/pdf-xobject.c index 6afe3d06..871f001a 100644 --- a/source/pdf/pdf-xobject.c +++ b/source/pdf/pdf-xobject.c @@ -80,11 +80,10 @@ pdf_new_xobject(fz_context *ctx, pdf_document *doc, const fz_rect *bbox, const f pdf_dict_put(ctx, form, PDF_NAME(Resources), res); ind = pdf_add_stream(ctx, doc, contents, form, 0); } - fz_catch(ctx) - { + fz_always(ctx) pdf_drop_obj(ctx, form); + fz_catch(ctx) fz_rethrow(ctx); - } return ind; } |