diff mbox series

trace-cmd dump: Free frac field of cpus_data

Message ID 20211109111707.250adb93@gandalf.local.home (mailing list archive)
State Accepted
Commit 88e1a5e1a5fec0345f51b3683564c5118004fb8e
Headers show
Series trace-cmd dump: Free frac field of cpus_data | expand

Commit Message

Steven Rostedt Nov. 9, 2021, 4:17 p.m. UTC
From 82a8d3e1f66454aabb640f165f4b4f4346cd5bf1 Mon Sep 17 00:00:00 2001
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Date: Tue, 9 Nov 2021 11:09:59 -0500
Subject: [PATCH] trace-cmd dump: Free frac field of cpus_data

Fix the memory leak of the frac field.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
Based on top of:
  https://lore.kernel.org/all/20211014150204.2485499-1-tz.stoyanov@gmail.com/

 tracecmd/trace-dump.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/tracecmd/trace-dump.c b/tracecmd/trace-dump.c
index ed97bd3f..b19ce89a 100644
--- a/tracecmd/trace-dump.c
+++ b/tracecmd/trace-dump.c
@@ -477,6 +477,7 @@  out:
 		free(cpus_data[j].times);
 		free(cpus_data[j].offsets);
 		free(cpus_data[j].scalings);
+		free(cpus_data[j].frac);
 	}
 	free(cpus_data);
 }