From a421b59fda2e11e53e542cd875fb1c67b27a430e Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Fri, 31 Oct 2025 17:04:52 +0100 Subject: [PATCH] add for another profiles nulls init option descriptor --- src/kds_s2000w_option_descriptors.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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) { -- 2.47.3