lkml.org 
[lkml]   [2008]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 12/19] pxa27x_udc: leak fix
Date
Fix a small leak

Closes #10660
---

drivers/usb/gadget/pxa27x_udc.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 7cbc78a..016c781 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -651,8 +651,10 @@ pxa_ep_alloc_request(struct usb_ep *_ep, gfp_t gfp_flags)
struct pxa27x_request *req;

req = kzalloc(sizeof *req, gfp_flags);
- if (!req || !_ep)
+ if (!req || !_ep) {
+ kfree(req);
return NULL;
+ }

INIT_LIST_HEAD(&req->queue);
req->in_use = 0;


\
 
 \ /
  Last update: 2008-10-05 18:43    [W:0.087 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site