summaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browsers/res_sample.c
diff options
context:
space:
mode:
authorPaolo Bonzini2019-08-09 16:53:39 +0200
committerPaolo Bonzini2019-08-09 16:53:39 +0200
commit0e1c438c44dd9cde56effb44c5f1cfeda72e108d (patch)
treefa3492d4d7d8b7444e5d8ebe6c78210826333e4b /tools/perf/ui/browsers/res_sample.c
parentselftests: kvm: Adding config fragments (diff)
parentarm64: KVM: hyp: debug-sr: Mark expected switch fall-through (diff)
downloadkernel-qcow2-linux-0e1c438c44dd9cde56effb44c5f1cfeda72e108d.tar.gz
kernel-qcow2-linux-0e1c438c44dd9cde56effb44c5f1cfeda72e108d.tar.xz
kernel-qcow2-linux-0e1c438c44dd9cde56effb44c5f1cfeda72e108d.zip
Merge tag 'kvmarm-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD
KVM/arm fixes for 5.3 - A bunch of switch/case fall-through annotation, fixing one actual bug - Fix PMU reset bug - Add missing exception class debug strings
Diffstat (limited to 'tools/perf/ui/browsers/res_sample.c')
-rw-r--r--tools/perf/ui/browsers/res_sample.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/ui/browsers/res_sample.c b/tools/perf/ui/browsers/res_sample.c
index c0dd73176d42..8aa3547bb9ff 100644
--- a/tools/perf/ui/browsers/res_sample.c
+++ b/tools/perf/ui/browsers/res_sample.c
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
/* Display a menu with individual samples to browse with perf script */
-#include "util.h"
#include "hist.h"
#include "evsel.h"
#include "hists.h"
@@ -8,6 +7,7 @@
#include "config.h"
#include "time-utils.h"
#include <linux/time64.h>
+#include <linux/zalloc.h>
static u64 context_len = 10 * NSEC_PER_MSEC;
@@ -46,14 +46,14 @@ int res_sample_browse(struct res_sample *res_samples, int num_res,
if (asprintf(&names[i], "%s: CPU %d tid %d", tbuf,
res_samples[i].cpu, res_samples[i].tid) < 0) {
while (--i >= 0)
- free(names[i]);
+ zfree(&names[i]);
free(names);
return -1;
}
}
choice = ui__popup_menu(num_res, names);
for (i = 0; i < num_res; i++)
- free(names[i]);
+ zfree(&names[i]);
free(names);
if (choice < 0 || choice >= num_res)