david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

convert to zalloc

This commit is contained in:
Holger Lubitz 2007-07-06 21:08:41 +02:00
parent 32e4ca8ae3
commit 389c63d7c4
1 changed files with 1 additions and 2 deletions

View File

@ -104,11 +104,10 @@ static int udp_open_common ( struct xfer_interface *xfer,
int rc;
/* Allocate and initialise structure */
udp = malloc ( sizeof ( *udp ) );
udp = zalloc ( sizeof ( *udp ) );
if ( ! udp )
return -ENOMEM;
DBGC ( udp, "UDP %p allocated\n", udp );
memset ( udp, 0, sizeof ( *udp ) );
xfer_init ( &udp->xfer, &udp_xfer_operations, &udp->refcnt );
memcpy ( &udp->peer, st_peer, sizeof ( udp->peer ) );