Re: [PATCH v2 2/5] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-08-09 Thread Mathias Nyman
On 27.07.2017 05:21, Lu Baolu wrote: xhci_disable_slot() allows the invoker to pass a command pointer as paramenter. Otherwise, it will allocate one. This will cause memory leak when a command structure was allocated inside of this function while queuing command trb fails. Another problem comes

Re: [PATCH v2 2/5] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-08-09 Thread Mathias Nyman
On 27.07.2017 05:21, Lu Baolu wrote: xhci_disable_slot() allows the invoker to pass a command pointer as paramenter. Otherwise, it will allocate one. This will cause memory leak when a command structure was allocated inside of this function while queuing command trb fails. Another problem comes

[PATCH v2 2/5] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-07-26 Thread Lu Baolu
xhci_disable_slot() allows the invoker to pass a command pointer as paramenter. Otherwise, it will allocate one. This will cause memory leak when a command structure was allocated inside of this function while queuing command trb fails. Another problem comes up when the invoker passed a command

[PATCH v2 2/5] usb: xhci: Fix potential memory leak in xhci_disable_slot()

2017-07-26 Thread Lu Baolu
xhci_disable_slot() allows the invoker to pass a command pointer as paramenter. Otherwise, it will allocate one. This will cause memory leak when a command structure was allocated inside of this function while queuing command trb fails. Another problem comes up when the invoker passed a command