summaryrefslogtreecommitdiff
path: root/tools/perf/ui/gtk/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/ui/gtk/util.c')
-rw-r--r--tools/perf/ui/gtk/util.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/perf/ui/gtk/util.c b/tools/perf/ui/gtk/util.c
index 696c1fbe4248..52e7fc48af9f 100644
--- a/tools/perf/ui/gtk/util.c
+++ b/tools/perf/ui/gtk/util.c
@@ -23,8 +23,7 @@ int perf_gtk__deactivate_context(struct perf_gtk_context **ctx)
if (!perf_gtk__is_active_context(*ctx))
return -1;
- free(*ctx);
- *ctx = NULL;
+ zfree(ctx);
return 0;
}