oqs: Postponed freeing of kem object

This commit is contained in:
Andreas Steffen 2020-11-02 16:49:37 +01:00 committed by Tobias Brunner
parent 004d28a970
commit 3b4d4193f5

View File

@ -211,11 +211,11 @@ METHOD(key_exchange_t, destroy, void,
private_oqs_kem_t *this)
{
DESTROY_IF(this->drbg);
OQS_KEM_free(this->kem);
memwipe(this->secret_key, this->kem->length_secret_key);
free(this->secret_key);
memwipe(this->shared_secret, this->kem->length_shared_secret);
free(this->shared_secret);
OQS_KEM_free(this->kem);
free(this->public_key);
free(this->ciphertext);
free(this);