diff options
Diffstat (limited to 'tools/perf/util/cs-etm.c')
-rw-r--r-- | tools/perf/util/cs-etm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c index 0c7776b51045..67b88b599a53 100644 --- a/tools/perf/util/cs-etm.c +++ b/tools/perf/util/cs-etm.c @@ -11,6 +11,7 @@ #include <linux/kernel.h> #include <linux/log2.h> #include <linux/types.h> +#include <linux/zalloc.h> #include <opencsd/ocsd_if_types.h> #include <stdlib.h> @@ -554,8 +555,7 @@ static void cs_etm__free_traceid_queues(struct cs_etm_queue *etmq) etmq->traceid_queues_list = NULL; /* finally free the traceid_queues array */ - free(etmq->traceid_queues); - etmq->traceid_queues = NULL; + zfree(&etmq->traceid_queues); } static void cs_etm__free_queue(void *priv) @@ -2538,7 +2538,7 @@ int cs_etm__process_auxtrace_info(union perf_event *event, return 0; } - if (session->itrace_synth_opts && session->itrace_synth_opts->set) { + if (session->itrace_synth_opts->set) { etm->synth_opts = *session->itrace_synth_opts; } else { itrace_synth_opts__set_default(&etm->synth_opts, @@ -2568,7 +2568,7 @@ err_free_etm: err_free_metadata: /* No need to check @metadata[j], free(NULL) is supported */ for (j = 0; j < num_cpu; j++) - free(metadata[j]); + zfree(&metadata[j]); zfree(&metadata); err_free_traceid_list: intlist__delete(traceid_list); |