[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-099c1130998fd2234a200b55d69713ec66d88325@git.kernel.org>
Date: Sat, 17 Feb 2018 03:28:56 -0800
From: tip-bot for Mathieu Poirier <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: peterz@...radead.org, linux-kernel@...r.kernel.org,
alexander.shishkin@...ux.intel.com, tglx@...utronix.de,
hpa@...or.com, acme@...hat.com, yao.jin@...ux.intel.com,
mathieu.poirier@...aro.org, namhyung@...nel.org, mingo@...nel.org
Subject: [tip:perf/core] perf cs-etm: Freeing allocated memory
Commit-ID: 099c1130998fd2234a200b55d69713ec66d88325
Gitweb: https://git.kernel.org/tip/099c1130998fd2234a200b55d69713ec66d88325
Author: Mathieu Poirier <mathieu.poirier@...aro.org>
AuthorDate: Mon, 12 Feb 2018 13:32:35 -0700
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 16 Feb 2018 14:55:39 -0300
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@...aro.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Jin Yao <yao.jin@...ux.intel.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: linux-arm-kernel@...ts.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@...hat.com>
---
tools/perf/util/cs-etm.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index b9f0a53..f2c9877 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);
}
Powered by blists - more mailing lists