summaryrefslogtreecommitdiffstats
path: root/CPUMeter.c
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-02-02 15:53:02 +0100
committerHisham <hisham@gobolinux.org>2016-02-02 15:53:02 +0100
commitb54d2dde407921caa7561dde6b45831ba93d0840 (patch)
treecd81eea35dd65e46d22f2801ea403e1efc06eb59 /CPUMeter.c
parenta1f7f2869ec2bd860d5b4e4b39736ca877afdf6f (diff)
Check for failure in allocations.
Diffstat (limited to 'CPUMeter.c')
-rw-r--r--CPUMeter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/CPUMeter.c b/CPUMeter.c
index 36d6c4e0..7685f405 100644
--- a/CPUMeter.c
+++ b/CPUMeter.c
@@ -140,7 +140,7 @@ static void AllCPUsMeter_getRange(Meter* this, int* start, int* count) {
static void AllCPUsMeter_init(Meter* this) {
int cpus = this->pl->cpuCount;
if (!this->drawData)
- this->drawData = calloc(cpus, sizeof(Meter*));
+ this->drawData = xCalloc(cpus, sizeof(Meter*));
Meter** meters = (Meter**) this->drawData;
int start, count;
AllCPUsMeter_getRange(this, &start, &count);

© 2014-2024 Faster IT GmbH | imprint | privacy policy