diff options
author | Patrick Georgi <patrick.georgi@coresystems.de> | 2009-11-17 11:52:18 +0000 |
---|---|---|
committer | Patrick Georgi <patrick.georgi@coresystems.de> | 2009-11-17 11:52:18 +0000 |
commit | 61c6aec071e47312aa39f6e0e1edf284f96e7c69 (patch) | |
tree | bcbf3f80f1100d9762b6f0bf54169c828fd5cb9c /util | |
parent | 34b876cfe1a53b251a5d8c3f1e1ba239964a7b2a (diff) |
Initialize memory before using it. put_bits wants it that way.
Trivial.
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4946 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util')
-rw-r--r-- | util/nvramtool/cmos_lowlevel.c | 2 |
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(); } |