diff options
author | Ian Rogers <irogers@google.com> | 2024-05-08 22:31:23 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-05-10 11:15:13 -0300 |
commit | 5ecab785396055c3d6f2207bf80be9feacdd7ddc (patch) | |
tree | 04f7cc18959f9c20cceab395f15a6f9f130afcab /tools/perf/builtin-trace.c | |
parent | 6fe61cb4aebb07ae1c6e8e136e39e76ca3363107 (diff) |
perf lock: Avoid memory leaks from strdup()
Leak sanitizer complains about the strdup-ed arguments not being freed
and given cmd_record doesn't modify the given strings, remove the
strdups.
Original discussion in this patch:
https://lore.kernel.org/lkml/20240430184156.1824083-1-irogers@google.com/
Suggested-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: zhaimingbing <zhaimingbing@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20240509053123.1918093-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-trace.c')
0 files changed, 0 insertions, 0 deletions