2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 15:21:32 +00:00

convert to zalloc

This commit is contained in:
Holger Lubitz 2007-06-18 01:25:10 +02:00
parent 68add6e814
commit dc6c1c294d

View File

@ -205,11 +205,10 @@ static int tcp_open ( struct xfer_interface *xfer, struct sockaddr *peer,
int rc;
/* Allocate and initialise structure */
tcp = malloc ( sizeof ( *tcp ) );
tcp = zalloc ( sizeof ( *tcp ) );
if ( ! tcp )
return -ENOMEM;
DBGC ( tcp, "TCP %p allocated\n", tcp );
memset ( tcp, 0, sizeof ( *tcp ) );
xfer_init ( &tcp->xfer, &tcp_xfer_operations, &tcp->refcnt );
tcp->prev_tcp_state = TCP_CLOSED;
tcp->tcp_state = TCP_STATE_SENT ( TCP_SYN );