From: Vivek Kumar Bhagat <vivek.bhagat@samsung.com>
To: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org
Subject: [EDT][PATCH] XHCI: Fix memory leak in error condition
Date: Fri, 26 Jun 2015 07:46:01 +0000 (GMT) [thread overview]
Message-ID: <1646270916.306041435304760891.JavaMail.weblogic@ep2mlwas07b> (raw)
[-- 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¥
next reply other threads:[~2015-06-26 7:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 7:46 Vivek Kumar Bhagat [this message]
2015-06-26 7:52 ` [EDT][PATCH] XHCI: Fix memory leak in error condition Roger Quadros
2015-06-26 16:43 ` Greg KH
2015-06-26 16:44 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1646270916.306041435304760891.JavaMail.weblogic@ep2mlwas07b \
--to=vivek.bhagat@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox