summaryrefslogtreecommitdiffstats
path: root/src/net/udp.c
diff options
context:
space:
mode:
authorHolger Lubitz2007-07-06 21:08:41 +0200
committerHolger Lubitz2007-07-06 21:08:41 +0200
commit389c63d7c450507b99d9db2e0c1cfe6397f03246 (patch)
treedb3b161e2d1a73079768f245bf27947bfba84fcb /src/net/udp.c
parentconvert to zalloc (diff)
downloadipxe-389c63d7c450507b99d9db2e0c1cfe6397f03246.tar.gz
ipxe-389c63d7c450507b99d9db2e0c1cfe6397f03246.tar.xz
ipxe-389c63d7c450507b99d9db2e0c1cfe6397f03246.zip
convert to zalloc
Diffstat (limited to 'src/net/udp.c')
-rw-r--r--src/net/udp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/net/udp.c b/src/net/udp.c
index c6216d8f..ad999c0a 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 ) );