From 4f0de0b9e2ba635846cf950d6c4380481148b373 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sun, 28 Apr 2024 18:44:54 +0200 Subject: [PATCH] fix no exit by convert error --- src/kds_s2000w_image_converter.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/kds_s2000w_image_converter.c b/src/kds_s2000w_image_converter.c index c65b5ac..3678801 100644 --- a/src/kds_s2000w_image_converter.c +++ b/src/kds_s2000w_image_converter.c @@ -35,8 +35,12 @@ void kds_s2000w_convert_jpg_to_pnm_with_depth(blobdata* in, blobdata* out, int d if (exception->severity != UndefinedException) CatchException(exception); - if (input_image == NULL) - exit(1); + + if (input_image == NULL) { + DestroyImageInfo(image_info); + DestroyExceptionInfo(exception); + return; + } DestroyImageInfo(image_info); DestroyExceptionInfo(exception); -- 2.39.5