From: Bastian Dehn Date: Fri, 31 Oct 2025 16:04:52 +0000 (+0100) Subject: add for another profiles nulls init option descriptor X-Git-Tag: v1.1.20^2~1^2~7 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=a421b59fda2e11e53e542cd875fb1c67b27a430e;p=sane-kds-s2000w-net.git add for another profiles nulls init option descriptor --- diff --git a/src/kds_s2000w_option_descriptors.c b/src/kds_s2000w_option_descriptors.c index d98ade3..909d3c9 100644 --- a/src/kds_s2000w_option_descriptors.c +++ b/src/kds_s2000w_option_descriptors.c @@ -1523,6 +1523,10 @@ SANE_Status _kds_s2000w_option_descriptors_init_min_profile() if (descriptors == NULL) return SANE_STATUS_NO_MEM; + for (int i = 0; i < max_option_count; i++) { + descriptors[i] = NULL; + } + for (int i = 0; i < max_option_count; i++) { descriptors[i] = malloc(sizeof(option_descriptor_t)); if (descriptors[i] == NULL) { @@ -1568,6 +1572,10 @@ SANE_Status _kds_s2000w_option_descriptors_init_230802_v1_0_36_profile() if (descriptors == NULL) return SANE_STATUS_NO_MEM; + for (int i = 0; i < max_option_count; i++) { + descriptors[i] = NULL; + } + for (int i = 0; i < max_option_count; i++) { descriptors[i] = malloc(sizeof(option_descriptor_t)); if (descriptors[i] == NULL) {