diff --git a/usb/usbview/enum.c b/usb/usbview/enum.c index 297e0d320..6c22344f5 100644 --- a/usb/usbview/enum.c +++ b/usb/usbview/enum.c @@ -951,6 +951,16 @@ EnumerateHub ( FREE(ConnectionInfo); } + if (ConnectionInfoV2) + { + FREE(ConnectionInfoV2); + } + + if (PortConnectorProps) + { + FREE(PortConnectorProps); + } + if (ConfigDesc) { FREE(ConfigDesc); @@ -973,6 +983,16 @@ EnumerateHub ( } while (StringDescs != NULL); } + + if(DevProps) + { + FreeDeviceProperties(&DevProps); + } + + if (hubCapabilityEx) + { + FREE(hubCapabilityEx); + } } //***************************************************************************** @@ -1367,6 +1387,24 @@ EnumerateHubPorts ( { FREE(connectionInfoExV2); } + + if (stringDescs != NULL) + { + PSTRING_DESCRIPTOR_NODE Next; + + do { + + Next = stringDescs->Next; + FREE(stringDescs); + stringDescs = Next; + + } while (stringDescs != NULL); + } + + if(DevProps) + { + FreeDeviceProperties(&DevProps); + } break; } diff --git a/usb/usbview/uvcview.h b/usb/usbview/uvcview.h index 6f7424624..ab2da2100 100644 --- a/usb/usbview/uvcview.h +++ b/usb/usbview/uvcview.h @@ -369,6 +369,8 @@ typedef struct _DEVICE_GUID_LIST { G L O B A L S *****************************************************************************/ +#if !defined(UVCVIEW_DISABLE_GLOBALS) + // // USBVIEW.C // @@ -429,6 +431,8 @@ PUSB_CONFIGURATION_DESCRIPTOR g_pConfigDesc; PSTRING_DESCRIPTOR_NODE g_pStringDescs; PUCHAR g_descEnd; +#endif + /***************************************************************************** F U N C T I O N P R O T O T Y P E S *****************************************************************************/