]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
add test close twice handler
authorBastian Dehn <hhaalo@arcor.de>
Mon, 10 Nov 2025 18:27:23 +0000 (19:27 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Mon, 10 Nov 2025 18:27:23 +0000 (19:27 +0100)
src/kds_s2000w_net.c
tests/kds_s2000w_net_tests.c

index 744e0d68fbffcfe93025f2dec85279907d279b1a..52c59739f407ea8ab771459107496a8dabaf2a5b 100644 (file)
@@ -104,8 +104,7 @@ void sane_kds_s2000w_net_close(SANE_Handle handle)
 {
        kds_s2000w_debug_printf(ALL, "sane_kds_s2000w_net_close");
 
-       const handler_t* h = (const handler_t*) handle;
-       if (h == NULL)
+       if (handle == NULL)
                return;
 
        kds_s2000w_option_descriptors_free();
index ddc7a0b10d50ceb9f65bbe254d940325c192b4e1..ab6506a5595bb9bb3666172bd1bed47dc1e9f9f5 100644 (file)
@@ -389,6 +389,7 @@ void sane_kds_s2000w_net_close_test()
 
        h = NULL;
        sane_kds_s2000w_net_close(h);
+       kds_s2000w_handler_close(h);
 }
 
 void sane_kds_s2000w_net_start_test(void** state)