perf cs-etm: Fix memory leak in error path
authorMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 12 Feb 2019 17:16:10 +0000 (10:16 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 14 Feb 2019 18:18:06 +0000 (15:18 -0300)
commitae4d9f5236439ef08f9963f39d5984959b1ae04d
tree00e8f8ab74643994b64c089bee59e1e7546dd58c
parent65963e5b4dfa9b9ba4bdf7ef8dc7d4424cfd2097
perf cs-etm: Fix memory leak in error path

Memory allocated for variable 't_params' isn't released properly in the
error path of function cs_etm_queue *cs_etm__alloc_queue() and
cs_etm__dump_event(), something this patch addresses.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Suzuki K Poulouse <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20190212171618.25355-6-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/cs-etm.c