openssl: Fix potential crash with ECDH on Windows
Apparently, we should use OPENSSL_free() to release memory allocated by
OpenSSL. While it generally maps to free() that's apparently not the
case on Windows, where the ECP test vectors caused `ACCESS_VIOLATION
exception` crashes (not always the same vector).
Fixes: 74e02ff5e6 ("openssl: Mainly use EVP interface for ECDH")
This commit is contained in:
@@ -246,7 +246,7 @@ METHOD(diffie_hellman_t, get_my_public_value, bool,
|
||||
if (pub.len != 0)
|
||||
{
|
||||
*value = chunk_clone(chunk_skip(pub, 1));
|
||||
chunk_free(&pub);
|
||||
OPENSSL_free(pub.ptr);
|
||||
return value->len != 0;
|
||||
}
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user