ecdsa_free(&c->ecdsa);
rsa_free(&c->rsa);
- if(c->hischallenge)
+ if(c->hischallenge) {
free(c->hischallenge);
+ c->hischallenge = NULL;
+ }
buffer_clear(&c->inbuf);
buffer_clear(&c->outbuf);
closesocket(c->socket);
c->socket = -1;
+
+ c->protocol_major = 0;
+ c->protocol_minor = 0;
+ c->allow_request = 0;
}
void free_connection(connection_t *c) {