]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
fix init get device info
authorBastian Dehn <hhaalo@arcor.de>
Tue, 27 Feb 2024 19:39:14 +0000 (20:39 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Tue, 27 Feb 2024 19:39:14 +0000 (20:39 +0100)
src/kds_s2000w_net.c

index 1306c9771fb35e8bf7c7c85959f557b5c24193d6..4909941cafb476db19b168989b2f44085ed475f9 100644 (file)
@@ -54,13 +54,14 @@ SANE_Status _sane_kds_s2000w_net_get_devices(SANE_Device*** device_list,
        if (local_only)
                return SANE_STATUS_NO_MEM;
 
-       own_device_list = malloc(sizeof(SANE_Device*));
+       own_device_list = malloc(sizeof(SANE_Device*) * 2);
        device_info = malloc(sizeof(SANE_Device));
        device_info->name = "kds_s2000w_net";
        device_info->vendor = "Kodak";
        device_info->model = "Kodak Alaris s2000w series";
        device_info->type = "sheetfed scanner";
-       *own_device_list = device_info;
+       own_device_list[0] = device_info;
+       own_device_list[1] = NULL;
        *device_list = own_device_list;
 
        return SANE_STATUS_GOOD;