[PATCH perf/core v2] perf: Make perf_exec_path always returns malloc'd string

2015-11-18 Thread Masami Hiramatsu
Since system_path() returns malloc'd string if given path is not an absolute path, perf_exec_path sometimes returns static string and sometimes returns malloc'd string depends on the environment variables or command options. This causes a memory leak because caller can not free the returned

[PATCH perf/core v2] perf: Make perf_exec_path always returns malloc'd string

2015-11-18 Thread Masami Hiramatsu
Since system_path() returns malloc'd string if given path is not an absolute path, perf_exec_path sometimes returns static string and sometimes returns malloc'd string depends on the environment variables or command options. This causes a memory leak because caller can not free the returned