Free objects that were dynamically allocated in libcrypto with OPENSSL_free().
authortobhe <tobhe@openbsd.org>
Mon, 7 Nov 2022 22:39:52 +0000 (22:39 +0000)
committertobhe <tobhe@openbsd.org>
Mon, 7 Nov 2022 22:39:52 +0000 (22:39 +0000)
commitbac832a5c25e7e4a37aa8aea7c96172ce7a7d681
treebda1a075d327cf84aadb7674ca9e9fdb9b75f527
parent393ea506ab4b4eaa18a451b80e347b40089e0a3e
Free objects that were dynamically allocated in libcrypto with OPENSSL_free().
When linking against libressl, OPENSSL_malloc() is just a wrapper around malloc()
so regular free() is safe. Other implementations allow switching to a different
allocator where free() could result in a possible heap corruption.

Report and initial fix by dropk1ck (gh #92)
ok tb@
sbin/iked/ca.c
sbin/iked/crypto.c
sbin/iked/ikev2.c