diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2017-11-08 22:09:59 +0100 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-11-23 15:12:02 +0100 |
commit | 88127dae6ed9d6aa938e9cf1776dc90b897fc1f7 (patch) | |
tree | b1ba5b5332108d1493aa5eedeb695092f953bed5 /scripts/kconfig/symbol.c | |
parent | kbuild: Set KBUILD_CFLAGS before incl. arch Makefile (diff) | |
download | linux-88127dae6ed9d6aa938e9cf1776dc90b897fc1f7.tar.xz linux-88127dae6ed9d6aa938e9cf1776dc90b897fc1f7.zip |
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>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig/symbol.c')
-rw-r--r-- | scripts/kconfig/symbol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index 20136ffefb23..3c8bd9bb4267 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++) |