lkml.org 
[lkml]   [2015]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[EDT][PATCH] 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 <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
\
 
 \ /
  Last update: 2015-06-26 10:01    [W:0.300 / U:0.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site