Fix early closing of input PDF.

This commit is contained in:
Michael R Sweet 2021-10-25 21:36:01 -04:00
parent e2b33a6cbb
commit 90ad1e694a
No known key found for this signature in database
GPG Key ID: 999559A027815955

View File

@ -1033,8 +1033,6 @@ do_unit_tests(void)
if (read_unit_file("testpdfio-out2.pdf", num_pages, first_image, true))
goto fail;
pdfioFileClose(inpdf);
// Create new encrypted PDF files...
fputs("pdfioFileCreate(\"testpdfio-rc4.pdf\", ...): ", stdout);
if ((outpdf = pdfioFileCreate("testpdfio-rc4.pdf", NULL, NULL, NULL, (pdfio_error_cb_t)error_cb, &error)) != NULL)
@ -1109,6 +1107,8 @@ do_unit_tests(void)
if (read_unit_file("testpdfio-aesp.pdf", num_pages, first_image, false))
return (1);
pdfioFileClose(inpdf);
return (0);
fail: