]> git.baikalelectronics.ru Git - kernel.git/commit
perf test session_topology: Delete session->evlist
authorRiccardo Mancini <rickyman7@gmail.com>
Thu, 15 Jul 2021 16:07:08 +0000 (18:07 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 15 Jul 2021 20:27:51 +0000 (17:27 -0300)
commitae4c6521be1e5478f04629cce6a8694fbb59284e
tree1793cf66ebbd8eeb5d6639a1f9d1c76bcaa1fdb1
parent1f4ddf9f97e57f5aff3900dab5069e0c6aac1b8d
perf test session_topology: Delete session->evlist

ASan reports a memory leak related to session->evlist while running:

  # perf test "41: Session topology".

When perf_data is in write mode, session->evlist is owned by the caller,
which should also take care of deleting it.

This patch adds the missing evlist__delete().

Signed-off-by: Riccardo Mancini <rickyman7@gmail.com>
Fixes: b8903912632f8d57 ("perf test: Add entry to test cpu topology")
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/822f741f06eb25250fb60686cf30a35f447e9e91.1626343282.git.rickyman7@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/topology.c