]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
exit only free is not null
authorBastian Dehn <hhaalo@arcor.de>
Sun, 2 Mar 2025 07:26:24 +0000 (08:26 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 2 Mar 2025 07:26:24 +0000 (08:26 +0100)
src/kds_s2000w_net.c

index 67936dfa61b8b9a99e0d673b5207d00c010361d9..7be04a24bb355f0ce7c140138618c414231fdd1d 100644 (file)
@@ -25,6 +25,9 @@ void sane_kds_s2000w_net_exit(void)
 {
        kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_exit");
 
+       if (device_info_ptr == NULL)
+               return;
+
        free(device_info_ptr[0]);
        device_info_ptr[0] = NULL;
        free(device_info_ptr);