diff options
author | Pete Batard <pete@akeo.ie> | 2012-04-10 13:05:37 +0100 |
---|---|---|
committer | Peter Stuge <peter@stuge.se> | 2012-04-20 08:12:33 +0200 |
commit | e291e369b975692dfa1a0f029244af597fa61220 (patch) | |
tree | 8b4015c3860b6c917655faf43ebbb7d99e5ada7c | |
parent | 2f40a03ea0552cd8b5ce3d7667b20dc04da061da (diff) | |
download | libusb-e291e369b975692dfa1a0f029244af597fa61220.tar.gz |
Windows: Warn on one libusb_get_device_list() memory allocation failure
libusbx.git commit 24d595aa71e7fd0f14d40e933a33f852f7269c8b
-rw-r--r-- | libusb/os/windows_usb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c index b2636a4..7f4149f 100644 --- a/libusb/os/windows_usb.c +++ b/libusb/os/windows_usb.c @@ -1460,6 +1460,8 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered priv->usb_interface[0].path = (char*) calloc(safe_strlen(priv->path)+1, 1); if (priv->usb_interface[0].path != NULL) { safe_strcpy(priv->usb_interface[0].path, safe_strlen(priv->path)+1, priv->path); + } else { + usbi_warn(ctx, "could not duplicate interface path '%s'", priv->path); } // The following is needed if we want API calls to work for both simple // and composite devices. |