From: Bastian Dehn Date: Mon, 10 Nov 2025 18:27:23 +0000 (+0100) Subject: add test close twice handler X-Git-Tag: v1.1.21^2~4 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=317fcef944c0edbed91d82954f293a95057639cd;p=sane-kds-s2000w-net.git add test close twice handler --- diff --git a/src/kds_s2000w_net.c b/src/kds_s2000w_net.c index 744e0d6..52c5973 100644 --- a/src/kds_s2000w_net.c +++ b/src/kds_s2000w_net.c @@ -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(); diff --git a/tests/kds_s2000w_net_tests.c b/tests/kds_s2000w_net_tests.c index ddc7a0b..ab6506a 100644 --- a/tests/kds_s2000w_net_tests.c +++ b/tests/kds_s2000w_net_tests.c @@ -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)