From: Bastian Dehn Date: Sun, 28 Apr 2024 16:44:54 +0000 (+0200) Subject: fix no exit by convert error X-Git-Tag: v1.0.1^2~11 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=4f0de0b9e2ba635846cf950d6c4380481148b373;p=sane-kds-s2000w-net.git fix no exit by convert error --- 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);