diff options
author | Tuukka Tikkanen <tuukka.tikkanen@linaro.org> | 2014-12-03 13:17:40 +0200 |
---|---|---|
committer | Tuukka Tikkanen <tuukka.tikkanen@linaro.org> | 2014-12-05 09:52:39 +0200 |
commit | d9b36c634c38fca287d179eb6380163eb9a34373 (patch) | |
tree | 9fd22dae974e98e56967256d47e8f4165ed68682 /idlestat.c | |
parent | 27f2342b422a3284a07cc541d780192dfab483a1 (diff) |
idlestat: Correct allocation size in inter()
The element count has already been incremented by the time of
calling realloc in inter(), so adding +1 to the element
count is unnecessary.
Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
Diffstat (limited to 'idlestat.c')
-rw-r--r-- | idlestat.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -263,8 +263,7 @@ static struct cpuidle_cstate *inter(struct cpuidle_cstate *c1, result->nrdata++; - tmp = realloc(data, sizeof(*data) * - (result->nrdata + 1)); + tmp = realloc(data, sizeof(*data) * result->nrdata); if (!tmp) { free(data); free(result); |