X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcpu.c;h=9c432d1791d0090191842aa364c48d761b5da72e;hb=72a76347831a848e6722d9147297a1e03c4c01d8;hp=7f8c9858995c7d11f3d853905e4d3e574d660822;hpb=7531a36086295c02ccb2d78c41d355a424426607;p=collectd.git diff --git a/src/cpu.c b/src/cpu.c index 7f8c9858..9c432d17 100644 --- 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;