mirror of https://github.com/ipxe/ipxe.git
convert to zalloc
parent
bb61774ee4
commit
c7549bcebe
|
@ -132,13 +132,12 @@ static int undirom_probe ( unsigned int rom_segment ) {
|
||||||
rom_len = ( romheader.ROMLength * 512 );
|
rom_len = ( romheader.ROMLength * 512 );
|
||||||
|
|
||||||
/* Allocate memory for UNDI ROM */
|
/* Allocate memory for UNDI ROM */
|
||||||
undirom = malloc ( sizeof ( *undirom ) );
|
undirom = zalloc ( sizeof ( *undirom ) );
|
||||||
if ( ! undirom ) {
|
if ( ! undirom ) {
|
||||||
DBG ( "Could not allocate UNDI ROM structure\n" );
|
DBG ( "Could not allocate UNDI ROM structure\n" );
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
memset ( undirom, 0, sizeof ( *undirom ) );
|
|
||||||
DBGC ( undirom, "UNDIROM %p trying expansion ROM at %04x:0000 "
|
DBGC ( undirom, "UNDIROM %p trying expansion ROM at %04x:0000 "
|
||||||
"(%zdkB)\n", undirom, rom_segment, ( rom_len / 1024 ) );
|
"(%zdkB)\n", undirom, rom_segment, ( rom_len / 1024 ) );
|
||||||
undirom->rom_segment = rom_segment;
|
undirom->rom_segment = rom_segment;
|
||||||
|
|
Loading…
Reference in New Issue