diff options
author | Hisham <hisham@gobolinux.org> | 2016-02-02 15:53:02 +0100 |
---|---|---|
committer | Hisham <hisham@gobolinux.org> | 2016-02-02 15:53:02 +0100 |
commit | b54d2dde407921caa7561dde6b45831ba93d0840 (patch) | |
tree | cd81eea35dd65e46d22f2801ea403e1efc06eb59 /linux/Battery.c | |
parent | a1f7f2869ec2bd860d5b4e4b39736ca877afdf6f (diff) |
Check for failure in allocations.
Diffstat (limited to 'linux/Battery.c')
-rw-r--r-- | linux/Battery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/Battery.c b/linux/Battery.c index ebf20372..572bad48 100644 --- a/linux/Battery.c +++ b/linux/Battery.c @@ -50,7 +50,7 @@ static unsigned long int parseBatInfo(const char *fileName, const unsigned short char* entryName = dirEntry->d_name; if (strncmp(entryName, "BAT", 3)) continue; - batteries[nBatteries] = strdup(entryName); + batteries[nBatteries] = xStrdup(entryName); nBatteries++; } closedir(batteryDir); |