aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-08-31 10:21:24 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2016-09-08 12:46:43 +0200
commit31cc77aace22f9025f0bf8178914b3c8045276e6 (patch)
tree6b0181591a3afa2c5be40bd8c786857bf3684176
parent72109798f19d51cf5640d9eebde3dd79fa1afe51 (diff)
downloadidlestat-31cc77aace22f9025f0bf8178914b3c8045276e6.tar.gz
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 <colin.king@canonical.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--idlestat.c1
1 files changed, 1 insertions, 0 deletions
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);