From: Colin Ian King colin.king@canonical.com
A realloc failure leaks result on the error return path.
Signed-off-by: Colin Ian King colin.king@canonical.com Signed-off-by: Daniel Lezcano daniel.lezcano@linaro.org --- idlestat.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/idlestat.c b/idlestat.c index 41ed3ab..739f6dc 100644 --- a/idlestat.c +++ b/idlestat.c @@ -221,6 +221,7 @@ static struct cpuidle_cstate *inter(struct cpuidle_cstate *c1, (result->nrdata + 1)); if (!tmp) { free(data); + free(result); return NULL; } data = tmp;