projects
/
platform
/
kernel
/
linux-3.10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2434365
)
usb: gadget: eliminate memory leak in slp gadget
author
Andrzej Pietrasiewicz
<andrzej.p@samsung.com>
Thu, 23 Jan 2014 10:18:36 +0000
(11:18 +0100)
committer
Chanho Park
<chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:46:55 +0000
(11:46 +0900)
Free the allocated acm_function_config struct in case of error.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Change-Id: Ie935cf67beccc2071d1ecd74437cffbe6a6827b8
drivers/usb/gadget/slp.c
patch
|
blob
|
history
diff --git
a/drivers/usb/gadget/slp.c
b/drivers/usb/gadget/slp.c
index
3ca9202
..
70b7d2f
100644
(file)
--- a/
drivers/usb/gadget/slp.c
+++ b/
drivers/usb/gadget/slp.c
@@
-282,6
+282,8
@@
err_usb_get_function_instance:
err_usb_get_function:
usb_put_function_instance(config->f_acm_inst[i]);
}
+ kfree(f->config);
+ f->config = NULL;
return ret;
}