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:
72167ba
)
depmod: fix leak on error path
author
Lucas De Marchi
<lucas.demarchi@intel.com>
Fri, 24 Feb 2017 05:47:37 +0000
(21:47 -0800)
committer
Lucas De Marchi
<lucas.demarchi@intel.com>
Fri, 24 Feb 2017 07:18:02 +0000
(23:18 -0800)
tools/depmod.c
patch
|
blob
|
history
diff --git
a/tools/depmod.c
b/tools/depmod.c
index
dea60ea
..
116adbe
100644
(file)
--- a/
tools/depmod.c
+++ b/
tools/depmod.c
@@
-1631,7
+1631,7
@@
static void depmod_report_cycles(struct depmod *depmod, uint16_t n_mods,
size_t n_r; /* local n_roots */
int i;
int err;
-
void **stack
;
+
_cleanup_free_ void **stack = NULL
;
struct mod *m;
struct mod *root;
struct hash *loop_set;
@@
-1675,6
+1675,7
@@
static void depmod_report_cycles(struct depmod *depmod, uint16_t n_mods,
num_cyclic = hash_get_count(loop_set);
ERR("Found %d modules in dependency cycles!\n", num_cyclic);
+
err:
hash_free(loop_set);
}