Free the table[i].sym field of the invalid sym_entry since it is malloc'ed data.
Signed-off-by: Yuanjun Gong <[email protected]> --- xen/tools/symbols.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/tools/symbols.c b/xen/tools/symbols.c index 710e9785d3..8daa588d2f 100644 --- a/xen/tools/symbols.c +++ b/xen/tools/symbols.c @@ -422,6 +422,8 @@ static void build_initial_tok_table(void) table[pos] = table[i]; learn_symbol(table[pos].sym, table[pos].len); pos++; + } else { + free(table[i].sym); } } table_cnt = pos; -- 2.17.1
