Browse Source

convert to zalloc

tags/v0.9.3
Holger Lubitz 17 years ago
parent
commit
c7549bcebe
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/arch/i386/drivers/net/undirom.c

+ 1
- 2
src/arch/i386/drivers/net/undirom.c View File

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

Loading…
Cancel
Save