[USBPORT] Fix ControllerName leak in USBPORT_GetUnicodeName (CID 1419258).
authorThomas Faber <thomas.faber@reactos.org>
Tue, 10 Oct 2017 22:32:05 +0000 (00:32 +0200)
committerThomas Faber <ThFabba@users.noreply.github.com>
Fri, 13 Oct 2017 21:36:29 +0000 (23:36 +0200)
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;
     }