Fix coverity CID #1465795 - Incorrect free deallocator used in SSL_add1_host()

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12628)
This commit is contained in:
Shane Lontis 2020-08-11 15:21:30 +10:00
parent 90e0e0d802
commit f2bfc53b02

View File

@ -981,7 +981,7 @@ int SSL_add1_host(SSL *s, const char *hostname)
old_ip = X509_VERIFY_PARAM_get1_ip_asc(s->param);
if (old_ip)
{
free(old_ip);
OPENSSL_free(old_ip);
/* There can be only one IP address */
return 0;
}