Windows: Remove initialization of calloc'ed memory
authorChris Dickens <christopher.a.dickens@gmail.com>
Wed, 1 Mar 2017 05:37:20 +0000 (21:37 -0800)
committerChris Dickens <christopher.a.dickens@gmail.com>
Wed, 1 Mar 2017 05:37:20 +0000 (21:37 -0800)
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/os/windows_winusb.c
libusb/version_nano.h

index 92c7234..545c59b 100644 (file)
@@ -891,7 +891,7 @@ static int cache_config_descriptors(struct libusb_device *dev, HANDLE hub_handle
 
        USB_CONFIGURATION_DESCRIPTOR_SHORT cd_buf_short; // dummy request
        PUSB_DESCRIPTOR_REQUEST cd_buf_actual = NULL;    // actual request
-       PUSB_CONFIGURATION_DESCRIPTOR cd_data = NULL;
+       PUSB_CONFIGURATION_DESCRIPTOR cd_data;
 
        if (dev->num_configurations == 0)
                return LIBUSB_ERROR_INVALID_PARAM;
@@ -900,9 +900,6 @@ static int cache_config_descriptors(struct libusb_device *dev, HANDLE hub_handle
        if (priv->config_descriptor == NULL)
                return LIBUSB_ERROR_NO_MEM;
 
-       for (i = 0; i < dev->num_configurations; i++)
-               priv->config_descriptor[i] = NULL;
-
        for (i = 0, r = LIBUSB_SUCCESS; ; i++) {
                // safe loop: release all dynamic resources
                safe_free(cd_buf_actual);
index 5c17f82..fd1ecda 100644 (file)
@@ -1 +1 @@
-#define LIBUSB_NANO 11188
+#define LIBUSB_NANO 11189