[USBPORT] Fix ControllerName leak in USBPORT_GetUnicodeName (CID 1419258).
[reactos.git] / drivers / usb / usbport / ioctl.c
index 7674391..7322958 100644 (file)
@@ -276,6 +276,7 @@ USBPORT_GetUnicodeName(IN PDEVICE_OBJECT FdoDevice,
 
     if (ControllerName->Header.UsbUserStatusCode != UsbUserSuccess)
     {
+        ExFreePoolWithTag(ControllerName, USB_PORT_TAG);
         return STATUS_UNSUCCESSFUL;
     }