From 389c63d7c450507b99d9db2e0c1cfe6397f03246 Mon Sep 17 00:00:00 2001 From: Holger Lubitz Date: Fri, 6 Jul 2007 21:08:41 +0200 Subject: convert to zalloc --- src/net/udp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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 ) ); -- cgit v1.2.3-55-g7522