]> git.ipfire.org Git - people/ms/strongswan.git/commitdiff
shared-key: Clear shared secret when destroyed
authorTobias Brunner <tobias@strongswan.org>
Thu, 30 Sep 2021 10:00:25 +0000 (12:00 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 4 Oct 2021 09:30:03 +0000 (11:30 +0200)
src/libstrongswan/credentials/keys/shared_key.c

index 97209953a3be48bd199a0b2f808877bb20c3e278..039398cd27a88b4ec1c63db82a2aaa33be687cbf 100644 (file)
@@ -77,7 +77,7 @@ METHOD(shared_key_t, destroy, void,
 {
        if (ref_put(&this->ref))
        {
-               free(this->key.ptr);
+               chunk_clear(&this->key);
                free(this);
        }
 }