|
@@ -149,9 +149,10 @@ tcp_dump_flags ( struct tcp_connection *conn, unsigned int flags ) {
|
149
|
149
|
static struct tcp_connection * alloc_tcp ( void ) {
|
150
|
150
|
struct tcp_connection *conn;
|
151
|
151
|
|
152
|
|
- conn = calloc ( 1, sizeof ( *conn ) );
|
|
152
|
+ conn = malloc ( sizeof ( *conn ) );
|
153
|
153
|
if ( conn ) {
|
154
|
154
|
DBGC ( conn, "TCP %p allocated\n", conn );
|
|
155
|
+ memset ( conn, 0, sizeof ( *conn ) );
|
155
|
156
|
conn->tcp_state = conn->prev_tcp_state = TCP_CLOSED;
|
156
|
157
|
conn->snd_seq = random();
|
157
|
158
|
conn->timer.expired = tcp_expired;
|