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