From: Holger Lubitz Date: Fri, 6 Jul 2007 19:08:41 +0000 (+0200) Subject: convert to zalloc X-Git-Tag: v0.9.3~258 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=389c63d7c450507b99d9db2e0c1cfe6397f03246;p=thirdparty%2Fipxe.git convert to zalloc --- diff --git a/src/net/udp.c b/src/net/udp.c index c6216d8ff..ad999c0a1 100644 --- a/src/net/udp.c +++ b/src/net/udp.c @@ -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 ) );