summaryrefslogtreecommitdiff
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2017-11-08 22:13:54 +0100
committerTom Rini <trini@konsulko.com>2017-11-20 20:18:36 -0500
commit0931ed3c0d0fdea924b7b7196ad92c467b50debf (patch)
tree45d936043abc929f636b3b11a9b23ed966b2cc2f /scripts/kconfig
parent69d3226530a0bb4945644778b903c5b95d858e30 (diff)
kconfig/symbol.c: use correct pointer type argument for sizeof
sym_arr is of type struct symbol **. So in malloc we need sizeof(struct symbol *). The problem was indicated by coccinelle. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/symbol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 20136ffefb..3c8bd9bb42 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -1061,7 +1061,7 @@ struct symbol **sym_re_search(const char *pattern)
}
if (sym_match_arr) {
qsort(sym_match_arr, cnt, sizeof(struct sym_match), sym_rel_comp);
- sym_arr = malloc((cnt+1) * sizeof(struct symbol));
+ sym_arr = malloc((cnt+1) * sizeof(struct symbol *));
if (!sym_arr)
goto sym_re_search_free;
for (i = 0; i < cnt; i++)