Clear newly allocated connection structs.

This commit is contained in:
Arnaud Cornet 2007-12-21 12:27:44 +01:00
parent e6efc4b1c5
commit 8d25dfea51
1 changed files with 1 additions and 1 deletions

View File

@ -989,7 +989,7 @@ static connection_t *connection_init(int anti_flood, int ssl, int timeout,
char *incoming;
list_t *outgoing;
conn = (connection_t*)malloc(sizeof(connection_t));
conn = (connection_t *)calloc(sizeof(connection_t), 1);
incoming = (char*)malloc(sizeof(char) * CONN_BUFFER_SIZE);
outgoing = list_new(NULL);