summaryrefslogtreecommitdiff
path: root/source/pdf
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-09-23 16:30:53 +0100
committerRobin Watts <robin.watts@artifex.com>2016-09-23 16:31:27 +0100
commit4af3e0db09623289f48c1c954455807a391b8870 (patch)
tree6a304f61f94d9ca2decd6f7d0ae4e232f3c06e28 /source/pdf
parent2b43eac53cd123b8746065f6098e22ab13be9fa1 (diff)
downloadmupdf-4af3e0db09623289f48c1c954455807a391b8870.tar.xz
Fix leak in error case of pdf_add_stream.
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-xref.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c
index 0cf20d4c..a7dc3514 100644
--- a/source/pdf/pdf-xref.c
+++ b/source/pdf/pdf-xref.c
@@ -2768,7 +2768,10 @@ pdf_add_stream(fz_context *ctx, pdf_document *doc, fz_buffer *buf)
fz_try(ctx)
pdf_update_stream(ctx, doc, ind, buf, 0);
fz_catch(ctx)
+ {
pdf_drop_obj(ctx, ind);
+ fz_rethrow(ctx);
+ }
return ind;
}