diff options
author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2018-02-12 13:32:35 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-02-16 14:55:39 -0300 |
commit | 099c1130998fd2234a200b55d69713ec66d88325 (patch) | |
tree | f737a1136f9160c21fa59e510ef099f42dd378d6 /tools/perf/util/cs-etm.c | |
parent | ab6e9a99345131cd8e54268d1d0dc04a33f7ed11 (diff) | |
download | lwn-099c1130998fd2234a200b55d69713ec66d88325.tar.gz lwn-099c1130998fd2234a200b55d69713ec66d88325.zip |
perf cs-etm: Freeing allocated memory
This patch frees all the memory allocated in function
cs_etm__alloc_queue().
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1518467557-18505-2-git-send-email-mathieu.poirier@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/cs-etm.c')
-rw-r--r-- | tools/perf/util/cs-etm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index b9f0a53dfa65..f2c98774e665 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -174,6 +174,12 @@ static void cs_etm__free_queue(void *priv) { struct cs_etm_queue *etmq = priv; + if (!etmq) + return; + + thread__zput(etmq->thread); + cs_etm_decoder__free(etmq->decoder); + zfree(&etmq->event_buf); free(etmq); } |