XHCI: Fix memory leak in error condition
Subsystems (2)
PATCH 1/1 XHCI: Fix memory leak in error condition
EP-EC562D6B53594479BCA6FC73F17DEE54
In error condition, td buffer is not freed which can lead to memory leak.
Signed-off-by Vivek Kumar Bhagat <[email protected]>
--- drivers/usb/host/xhci.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/host/xhci.c +1 -0
@@ -1438,6 +1438,7 @@ dying: ret = -ESHUTDOWN ; free_priv:xhci_urb_free_priv (urb_priv); +kfree (buffer); urb->hcpriv =NULL ;spin_unlock_irqrestore (&xhci->lock, flags);return ret;
Signature · 1 line
1.7.9.5���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m����������?�I�Quoted 15 lines · Vivek Kumar Bhagat
EP-EC562D6B53594479BCA6FC73F17DEE54
In error condition, td buffer is not freed which can lead to memory leak.Signed-off-by Vivek Kumar Bhagat <[email protected]>--- drivers/usb/host/xhci.c | 1 + 1 file changed, 1 insertion(+)drivers/usb/host/xhci.c +0
-0
drivers/usb/host/xhci.c dying: · line 1444
Quoted 7 lines
drivers/usb/host/xhci.c +1
-0@@ -1438,6 +1438,7 @@ dying: ret = -ESHUTDOWN ; free_priv:xhci_urb_free_priv (urb_priv); +kfree (buffer); urb->hcpriv =NULL ;spin_unlock_irqrestore (&xhci->lock, flags);return ret;
Do you need to fix up xhci_urb_free_priv() as well?
cheers,
-roger
Greg KH
maintainerQuoted 1 line · Vivek Kumar Bhagat
EP-EC562D6B53594479BCA6FC73F17DEE54
What is that crazy line for? It doesn't belong here.
Greg KH
maintainerQuoted 8 lines · Vivek Kumar Bhagat
EP-EC562D6B53594479BCA6FC73F17DEE54
In error condition, td buffer is not freed which can lead to memory leak.Signed-off-by Vivek Kumar Bhagat <[email protected]>--- drivers/usb/host/xhci.c | 1 + 1 file changed, 1 insertion(+)
Also, please use scripts/get_maintainer.pl to determine who to send patches to. Hint, I'm not the one for this patch, I can't do anything with it...