projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
treewide: cleanup malloc calls
[collectd.git]
/
src
/
cpu.c
diff --git
a/src/cpu.c
b/src/cpu.c
index
7f8c985
..
9c432d1
100644
(file)
--- a/
src/cpu.c
+++ b/
src/cpu.c
@@
-814,8
+814,7
@@
static int cpu_read (void)
if (pnumcpu != numcpu || perfcpu == NULL)
{
- if (perfcpu != NULL)
- free(perfcpu);
+ free(perfcpu);
perfcpu = malloc(numcpu * sizeof(perfstat_cpu_t));
}
pnumcpu = numcpu;