1
0

Just set an s->remote_key pointer to NULL, do not call crypt_key_destroy on it.

This commit is contained in:
Alexander Andreev 2024-03-25 05:02:59 +04:00
parent b225b63cdf
commit 5174c2685e
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34

View File

@ -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;
} }