From: Wang Nan Date: Sun, 17 May 2015 10:56:27 +0000 (+0000) Subject: perf tools: Set vmlinux_path__nr_entries to 0 in vmlinux_path__exit X-Git-Tag: omap-for-v4.3/legacy-v2-signed~210^2~43^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4f035473d93c1594d8225f6dd97332317820801;p=pandora-kernel.git perf tools: Set vmlinux_path__nr_entries to 0 in vmlinux_path__exit Original vmlinux_path__exit() doesn't revert vmlinux_path__nr_entries to its original state. After the while loop vmlinux_path__nr_entries becomes -1 instead of 0. This makes a problem that, if runs twice, during the second run vmlinux_path__init() will set vmlinux_path[-1] to strdup("vmlinux"), corrupts random memory. This patch reset vmlinux_path__nr_entries to 0 after the while loop. Signed-off-by: Wang Nan Acked-by: Namhyung Kim Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: David Ahern Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Paul Mackerras Cc: Peter Zijlstra Cc: pi3orama@163.com Cc: Zefan Li Link: http://lkml.kernel.org/r/1431860222-61636-3-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed