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
This commit is contained in:
Patrick Georgi 2009-11-17 11:52:18 +00:00
parent 34b876cfe1
commit 61c6aec071
1 changed files with 1 additions and 1 deletions

View File

@ -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(); }