From 9eb7cda29839d29ed07db5447822cd1001235fb8 Mon Sep 17 00:00:00 2001 From: Luuk Vinke Date: Thu, 5 Nov 2026 17:15:24 +0100 Subject: [PATCH] imagetops-pstops.c: Do not call cfImageClose() on a NULL image Calling cfImageClose(img) when the image failed to open crashes the filter; skip the close since there is nothing to close. Fixes #79 --- ppd/imagetops-pstops.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ppd/imagetops-pstops.c b/ppd/imagetops-pstops.c index a1b2fccf..bf12609a 100644 --- a/ppd/imagetops-pstops.c +++ b/ppd/imagetops-pstops.c @@ -1178,7 +1178,6 @@ ppdFilterImageToPS(int inputfd, // I - File descriptor input if (log) log(ld, CF_LOGLEVEL_ERROR, "ppdFilterImageToPS: The print file could not be opened - %s", strerror(errno)); - cfImageClose(img); fclose(doc.outputfp); close(outputfd); return (1);