perf probe: Free string returned by synthesize_perf_probe_point() on failure in synth...
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 4 Aug 2023 16:18:38 +0000 (13:18 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 7 Aug 2023 19:40:29 +0000 (16:40 -0300)
commita612bbf8b8fdd29136a1ac8b2afca3780278d344
tree20073dc2602f7d2a9aa54637e8513afc4105cf68
parent7bc0153c53bc1ef96e5d1ffb039d9070a944966b
perf probe: Free string returned by synthesize_perf_probe_point() on failure in synthesize_perf_probe_command()

Building perf with EXTRA_CFLAGS="-fsanitize=address" a leak was detected
elsewhere and lead to an audit, where we found that
synthesize_perf_probe_command() may leak synthesize_perf_probe_point()
return on failure, fix it.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/lkml/ZM0mzpQktHnhXJXr@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/probe-event.c