]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
fix no exit by convert error
authorBastian Dehn <hhaalo@arcor.de>
Sun, 28 Apr 2024 16:44:54 +0000 (18:44 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 28 Apr 2024 16:44:54 +0000 (18:44 +0200)
src/kds_s2000w_image_converter.c

index c65b5ac55d4fde48fb93688d10ceea6b7809b646..36788017776037bb6761acea0d72d9face67a39d 100644 (file)
@@ -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);