diff options
author | Dirk Lemstra <dirk@lemstra.org> | 2021-01-04 21:59:09 +0100 |
---|---|---|
committer | Dirk Lemstra <dirk@lemstra.org> | 2021-01-04 21:59:09 +0100 |
commit | 8d8a01057663b11c872589ebc3038f93236fe44a (patch) | |
tree | 5eed4a311ce6867a90b9e09050c5fa50f6eb38d4 | |
parent | eaf760145905caaf45e8856d646f9c36003af0cd (diff) | |
download | ImageMagick-8d8a01057663b11c872589ebc3038f93236fe44a.tar.gz |
Added missing calls to RelinquishUniqueFileResource.
-rw-r--r-- | coders/pdf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/coders/pdf.c b/coders/pdf.c index 38613a3f4..f82d7c005 100644 --- a/coders/pdf.c +++ b/coders/pdf.c @@ -567,6 +567,7 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception) file=AcquireUniqueFileResource(postscript_filename); if (file == -1) { + (void) RelinquishUniqueFileResource(input_filename); ThrowFileException(exception,FileOpenError,"UnableToCreateTemporaryFile", image_info->filename); CleanupPDFInfo(&pdf_info); @@ -576,6 +577,7 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception) if (write(file," ",1) != 1) { file=close(file)-1; + (void) RelinquishUniqueFileResource(input_filename); (void) RelinquishUniqueFileResource(postscript_filename); CleanupPDFInfo(&pdf_info); image=DestroyImage(image); @@ -594,6 +596,7 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception) delegate_info=GetDelegateInfo("ps:alpha",(char *) NULL,exception); if (delegate_info == (const DelegateInfo *) NULL) { + (void) RelinquishUniqueFileResource(input_filename); (void) RelinquishUniqueFileResource(postscript_filename); CleanupPDFInfo(&pdf_info); image=DestroyImage(image); |