projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d76d251
)
CPU Percentage: after realloc the pointer becomes invalid; need to work on new pointer.
author
Wilfried Goesgens
<dothebart@citadel.org>
Sat, 7 Jun 2014 14:57:50 +0000
(16:57 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sat, 7 Jun 2014 14:57:50 +0000
(16:57 +0200)
fixes https://gist.github.com/toni-moreno/
a2f80021535f87202de7
src/cpu.c
patch
|
blob
|
history
diff --git
a/src/cpu.c
b/src/cpu.c
index
2e225fd
..
79dc150
100644
(file)
--- a/
src/cpu.c
+++ b/
src/cpu.c
@@
-241,10
+241,11
@@
static int cpu_states_grow (void)
return -1;
}
- for (i = percents_cells; i < size; i++)
+ percents = tmp;
+
+ for (i = percents_cells ; i < size; i++)
memset(&percents[i], 0, sizeof(*percents));
- percents = tmp;
percents_cells = size;
return 0;
} /* cpu_states_grow */