|
@@ -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;
|