projects
/
platform
/
upstream
/
kmod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a96c5f
)
Fix leak of kmod_module and fix code style
author
Lucas De Marchi
<lucas.demarchi@profusion.mobi>
Sun, 1 Jan 2012 07:55:25 +0000
(
05:55
-0200)
committer
Lucas De Marchi
<lucas.demarchi@profusion.mobi>
Sun, 1 Jan 2012 08:12:59 +0000
(06:12 -0200)
tools/kmod-modprobe.c
patch
|
blob
|
history
diff --git
a/tools/kmod-modprobe.c
b/tools/kmod-modprobe.c
index
2a649dd
..
c985a83
100644
(file)
--- a/
tools/kmod-modprobe.c
+++ b/
tools/kmod-modprobe.c
@@
-509,12
+509,14
@@
done:
}
deps = kmod_module_get_dependencies(mod);
- if (deps) {
+ if (deps
!= NULL
) {
kmod_list_foreach(itr, deps) {
struct kmod_module *dep = kmod_module_get_module(itr);
- if (kmod_module_get_refcnt(dep) == 0) {
+
+ if (kmod_module_get_refcnt(dep) == 0)
rmmod_do(dep);
- }
+
+ kmod_module_unref(dep);
}
kmod_module_unref_list(deps);
}