free_connection_partially(): Avoid possible use-after-free for c->hischallenge
This commit is contained in:
parent
7a6ca7a993
commit
d3f4cf59ca
1 changed files with 3 additions and 1 deletions
|
@ -64,8 +64,10 @@ void free_connection_partially(connection_t *c) {
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue