diff options
author | Colin Ian King <colin.king@canonical.com> | 2014-02-18 08:51:30 +0100 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@free.fr> | 2014-02-18 08:51:30 +0100 |
commit | e4f2085c3abf3fa5db3318bf82348736d6c43714 (patch) | |
tree | a2c5e379cece8674425447a5bc81fbb93a722eda | |
parent | 69dde53657504f92e1f13c321a791917e79249cf (diff) |
Fix memory leak, result is being leaked on a realloc failure
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>
-rw-r--r-- | idlestat.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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; |