diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2022-08-17 12:56:22 +0100 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2022-08-17 12:57:51 +0100 |
commit | f08b369a16ef9de025ce85768d2bb54981e531f6 (patch) | |
tree | 6130d5f985f38004b2eb13dfd60888075ff598c6 | |
parent | 05efb77627aa0e05ab59ec1d6cb6988e1eb9710e (diff) | |
download | ghostpdl-f08b369a16ef9de025ce85768d2bb54981e531f6.tar.gz |
Coverity ID 380288
We can't get to the 'exit' label after we've added the Parent, so
there's no need for the code to remove it again currently.
Explicitly cast the cleartomark to void just to indicate it's
deliberate.
-rw-r--r-- | pdf/pdf_image.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/pdf/pdf_image.c b/pdf/pdf_image.c index a9ab9250c..5de000294 100644 --- a/pdf/pdf_image.c +++ b/pdf/pdf_image.c @@ -2629,7 +2629,7 @@ int pdfi_Do(pdf_context *ctx, pdf_dict *stream_dict, pdf_dict *page_dict) AddedParent = true; } - code = pdfi_loop_detector_cleartomark(ctx); + (void)pdfi_loop_detector_cleartomark(ctx); /* NOTE: Used to have a pdfi_gsave/pdfi_grestore around this, but it actually makes * things render incorrectly (and isn't in the PS code). * It also causes demo.ai.pdf to crash. @@ -2656,10 +2656,6 @@ int pdfi_Do(pdf_context *ctx, pdf_dict *stream_dict, pdf_dict *page_dict) return code; exit: - if (AddedParent == true) { - (void)pdfi_dict_delete(ctx, sdict, "Parent"); - pdfi_countdown(sdict); - } (void)pdfi_loop_detector_cleartomark(ctx); exit1: pdfi_countdown(n); |