From 31cc77aace22f9025f0bf8178914b3c8045276e6 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Wed, 31 Aug 2016 10:21:24 +0100 Subject: fix memory leak in cpuidle_get_target_residency, free fpathA fpath is not being free'd causing a small memory leak, free it. Signed-off-by: Colin Ian King Signed-off-by: Daniel Lezcano --- idlestat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/idlestat.c b/idlestat.c index ede98a0..f6a07e5 100644 --- a/idlestat.c +++ b/idlestat.c @@ -293,6 +293,7 @@ int cpuidle_get_target_residency(int cpu, int state) free(fpath); return -1; } + free(fpath); ret = fscanf(snf, "%u", &tr); fclose(snf); -- cgit v1.2.3