usb: xhci: Fix memory leak in xhci_endpoint_reset()
authorZheng Xiaowei <zhengxiaowei@ruijie.com.cn>
Fri, 20 Jul 2018 15:05:11 +0000 (18:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Jul 2018 15:17:21 +0000 (17:17 +0200)
commitd89b7664f76047e7beca8f07e86f2ccfad085a28
tree1d3f59acb0c39dbea8fb935e5e69ab5d338feaef
parentc413767e6698ae24ac1904827314470cacff1497
usb: xhci: Fix memory leak in xhci_endpoint_reset()

If td_list is not empty the cfg_cmd will not be freed,
call xhci_free_command to free it.

Signed-off-by: Zheng Xiaowei <zhengxiaowei@ruijie.com.cn>
Cc: <stable@vger.kernel.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci.c