Just set an s->remote_key pointer to NULL, do not call crypt_key_destroy on it.
This commit is contained in:
parent
b225b63cdf
commit
5174c2685e
@ -198,5 +198,5 @@ void crypt_session_destroy(crypt_session_t *const s) {
|
|||||||
sodium_memzero(s->rx, CRYPT_SESS_KEY_LEN);
|
sodium_memzero(s->rx, CRYPT_SESS_KEY_LEN);
|
||||||
sodium_memzero(s->tx, CRYPT_SESS_KEY_LEN);
|
sodium_memzero(s->tx, CRYPT_SESS_KEY_LEN);
|
||||||
sodium_memzero(s->nonce, CRYPT_NONCE_LEN);
|
sodium_memzero(s->nonce, CRYPT_NONCE_LEN);
|
||||||
crypt_key_destroy(s->remote_key);
|
s->remote_key = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user