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 <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>