diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2022-08-17 09:57:37 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2022-08-17 14:07:21 +0100 |
commit | 27152931e783a7dffd22443c88e0234957ca1a1c (patch) | |
tree | 54e2e025845fd082d092180a47e84a6a2d05952e | |
parent | 3eb1eeac22f53b8b332e67d8ba18540f4020eadc (diff) | |
download | ghostpdl-27152931e783a7dffd22443c88e0234957ca1a1c.tar.gz |
oss-fuzz 50307: free temporary forwarding device on error
-rw-r--r-- | devices/vector/gdevpdfi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/devices/vector/gdevpdfi.c b/devices/vector/gdevpdfi.c index 724e36547..1de48cee6 100644 --- a/devices/vector/gdevpdfi.c +++ b/devices/vector/gdevpdfi.c @@ -2214,8 +2214,10 @@ pdf_image3x_make_mcde(gx_device *dev, const gs_gstate *pgs, code = pdf_begin_typed_image ((gx_device_pdf *)dev, pgs, pmat, pic, prect, pdcolor, pcpath, mem, pinfo, PDF_IMAGE_TYPE3_DATA); - if (code < 0) + if (code < 0) { + rc_decrement(*pmcdev, "pdf_image3x_make_mcde"); return code; + } if ((*pinfo)->procs != &pdf_image_enum_procs) { /* We couldn't handle the image. Bail out. */ gx_image_end(*pinfo, false); |