From: Shane Lontis Date: Tue, 11 Aug 2020 05:21:30 +0000 (+1000) Subject: Fix coverity CID #1465795 - Incorrect free deallocator used in SSL_add1_host() X-Git-Tag: openssl-3.0.0-alpha7~509 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=f2bfc53b02fd4cf328cf6200452b86adfdc15489 Fix coverity CID #1465795 - Incorrect free deallocator used in SSL_add1_host() Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/12628) --- diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index c72341547a..ad1cfb4f40 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -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; }