From 93f0feb1e7c8c7d67a912f3a6a5df1285582eb4e Mon Sep 17 00:00:00 2001 From: Chris Dickens Date: Tue, 28 Feb 2017 21:37:20 -0800 Subject: [PATCH] Windows: Remove initialization of calloc'ed memory Signed-off-by: Chris Dickens --- libusb/os/windows_winusb.c | 5 +---- libusb/version_nano.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/libusb/os/windows_winusb.c b/libusb/os/windows_winusb.c index 92c7234..545c59b 100644 --- a/libusb/os/windows_winusb.c +++ b/libusb/os/windows_winusb.c @@ -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); diff --git a/libusb/version_nano.h b/libusb/version_nano.h index 5c17f82..fd1ecda 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11188 +#define LIBUSB_NANO 11189 -- 2.7.4