shared-key: Clear shared secret when destroyed

This commit is contained in:
Tobias Brunner
2021-10-04 11:30:03 +02:00
parent 5c24b05f0c
commit 16d91ab761
@@ -77,7 +77,7 @@ METHOD(shared_key_t, destroy, void,
{ {
if (ref_put(&this->ref)) if (ref_put(&this->ref))
{ {
free(this->key.ptr); chunk_clear(&this->key);
free(this); free(this);
} }
} }