projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49c1940
)
dmi-id: fix a memory leak in dmi_id_init error path
author
Axel Lin
<axel.lin@gmail.com>
Thu, 1 Jul 2010 02:35:07 +0000
(10:35 +0800)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Thu, 5 Aug 2010 20:53:34 +0000
(13:53 -0700)
This patch adds a missing kfree(dmi_dev) in dmi_id_init error path.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/firmware/dmi-id.c
patch
|
blob
|
history
diff --git
a/drivers/firmware/dmi-id.c
b/drivers/firmware/dmi-id.c
index a777a35381d2ca80ac0dd8846d860d650ef7bf00..94a58a082b9930a2acc05192273c6941ef003ef6 100644
(file)
--- a/
drivers/firmware/dmi-id.c
+++ b/
drivers/firmware/dmi-id.c
@@
-229,10
+229,12
@@
static int __init dmi_id_init(void)
ret = device_register(dmi_dev);
if (ret)
- goto fail_
class_unregister
;
+ goto fail_
free_dmi_dev
;
return 0;
+fail_free_dmi_dev:
+ kfree(dmi_dev);
fail_class_unregister:
class_unregister(&dmi_class);