From: Holger Lubitz Date: Sun, 17 Jun 2007 23:24:34 +0000 (+0200) Subject: convert to zalloc X-Git-Tag: v0.9.3~277 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c7549bcebe015293616b24b42cc72a117024776d;p=thirdparty%2Fipxe.git convert to zalloc --- diff --git a/src/arch/i386/drivers/net/undirom.c b/src/arch/i386/drivers/net/undirom.c index e8119f2e3..45bcf9694 100644 --- a/src/arch/i386/drivers/net/undirom.c +++ b/src/arch/i386/drivers/net/undirom.c @@ -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;