summaryrefslogtreecommitdiff
path: root/util/nvramtool
diff options
context:
space:
mode:
Diffstat (limited to 'util/nvramtool')
-rw-r--r--util/nvramtool/cmos_lowlevel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/nvramtool/cmos_lowlevel.c b/util/nvramtool/cmos_lowlevel.c
index 7fd603bd28..570161b4e0 100644
--- a/util/nvramtool/cmos_lowlevel.c
+++ b/util/nvramtool/cmos_lowlevel.c
@@ -93,7 +93,7 @@ unsigned long long cmos_read (const cmos_entry_t *e)
result = 0;
if (e->config == CMOS_ENTRY_STRING)
- { char *newstring = malloc((length+7)/8);
+ { char *newstring = calloc(1, (length+7)/8);
unsigned usize = (8 * sizeof(unsigned long long));
if(!newstring) { out_of_memory(); }