public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [EDT][PATCH] XHCI: Fix memory leak in error condition
@ 2015-06-26  7:46 Vivek Kumar Bhagat
  2015-06-26  7:52 ` Roger Quadros
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vivek Kumar Bhagat @ 2015-06-26  7:46 UTC (permalink / raw)
  To: linux-usb, gregkh, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 759 bytes --]

EP-EC562D6B53594479BCA6FC73F17DEE54
In error condition, td buffer is not freed which can lead
to memory leak.

Signed-off-by: Vivek Kumar Bhagat <vivek.bhagat@samsung.com>
---
 drivers/usb/host/xhci.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 36bf089..dc02532 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -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;
-- 
1.7.9.5ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-26 16:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-26  7:46 [EDT][PATCH] XHCI: Fix memory leak in error condition Vivek Kumar Bhagat
2015-06-26  7:52 ` Roger Quadros
2015-06-26 16:43 ` Greg KH
2015-06-26 16:44 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox