]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
free unconverted image
authorBastian Dehn <hhaalo@arcor.de>
Sat, 21 Dec 2024 12:11:12 +0000 (13:11 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 21 Dec 2024 12:11:12 +0000 (13:11 +0100)
src/kds_s2000w_handler.c

index 028e15a3faf042dbfca6e2ec661532b6a55354fa..19ee7347c7c2792e4d90cc345fb55f2bc647c92d 100644 (file)
@@ -26,6 +26,9 @@ void _get_current_metadata(handler* h)
        scanner_image->data = malloc(sizeof(char) *  image->size);
        scanner_image->size = image->size;
        memcpy(scanner_image->data,  image->data,  image->size);
+       free(image->data);
+       image->data = NULL;
+       image->data = 0;
 
        h->current_metadata->valid = 0;
        h->current_metadata->channels = 1;