Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf tests: Fix memory leak by expr__find_other() in test__expr()
================================================================= ==7506==ERROR: LeakSanitizer: detected memory leaks Direct leak of 13 byte(s) in 3 object(s) allocated from: #0 0x7f03339d6070 in __interceptor_strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3b070) MIPS#1 0x5625e53aaef0 in expr__find_other util/expr.y:221 MIPS#2 0x5625e51bcd3f in test__expr tests/expr.c:52 MIPS#3 0x5625e51528e6 in run_test tests/builtin-test.c:358 MIPS#4 0x5625e5152baf in test_and_print tests/builtin-test.c:388 MIPS#5 0x5625e51543fe in __cmd_test tests/builtin-test.c:583 MIPS#6 0x5625e515572f in cmd_test tests/builtin-test.c:722 MIPS#7 0x5625e51c3fb8 in run_builtin /home/changbin/work/linux/tools/perf/perf.c:302 MIPS#8 0x5625e51c44f7 in handle_internal_command /home/changbin/work/linux/tools/perf/perf.c:354 MIPS#9 0x5625e51c48fb in run_argv /home/changbin/work/linux/tools/perf/perf.c:398 MIPS#10 0x5625e51c5069 in main /home/changbin/work/linux/tools/perf/perf.c:520 MIPS#11 0x7f033214d09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a) Signed-off-by: Changbin Du <changbin.du@gmail.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Andi Kleen <ak@linux.intel.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org> Fixes: 0751673 ("perf tools: Add a simple expression parser for JSON") Link: http://lkml.kernel.org/r/20190316080556.3075-16-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
- Loading branch information