Skip to contentSkip to conversation

trace-cmd dump: Free frac field of cpus_data

PATCH New Steven Rostedt 1 participant 1 message Nov 9, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace-cmd dump: Free frac field of cpus_data

From 82a8d3e1f66454aabb640f165f4b4f4346cd5bf1 Mon Sep 17 00:00:00 2001
From: "Steven Rostedt (VMware)" <[email protected]>
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.

---
Based on top of:
https://lore.kernel.org/all/[email protected]/

 tracecmd/trace-dump.c | 1 +
 1 file changed, 1 insertion(+)
tracecmd/trace-dump.c +1 -0
index ed97bd3f..b19ce89a 100644
@@ -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);
 }
Signature · 1 line
2.31.1