diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 9ef8b8946b11..82a31fd0fcf5 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1819,6 +1819,7 @@ static void vmlinux_path__exit(void) { while (--vmlinux_path__nr_entries >= 0) zfree(&vmlinux_path[vmlinux_path__nr_entries]); + vmlinux_path__nr_entries = 0; zfree(&vmlinux_path); }