david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

convert to zalloc

This commit is contained in:
Holger Lubitz 2007-06-18 01:24:34 +02:00
parent bb61774ee4
commit c7549bcebe
1 changed files with 1 additions and 2 deletions

View File

@ -132,13 +132,12 @@ static int undirom_probe ( unsigned int rom_segment ) {
rom_len = ( romheader.ROMLength * 512 );
/* Allocate memory for UNDI ROM */
undirom = malloc ( sizeof ( *undirom ) );
undirom = zalloc ( sizeof ( *undirom ) );
if ( ! undirom ) {
DBG ( "Could not allocate UNDI ROM structure\n" );
rc = -ENOMEM;
goto err;
}
memset ( undirom, 0, sizeof ( *undirom ) );
DBGC ( undirom, "UNDIROM %p trying expansion ROM at %04x:0000 "
"(%zdkB)\n", undirom, rom_segment, ( rom_len / 1024 ) );
undirom->rom_segment = rom_segment;