From: Christos Tsantilas Date: Wed, 20 Jul 2011 11:41:44 +0000 (+1200) Subject: Bug 3114: Memory leak in SSL certificate verify code X-Git-Tag: SQUID_3_1_15~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e30059188f15b903ca058f0e41deae693385b546;p=thirdparty%2Fsquid.git Bug 3114: Memory leak in SSL certificate verify code --- diff --git a/src/ssl_support.cc b/src/ssl_support.cc index 546c4cbd54..a3abb017e6 100644 --- a/src/ssl_support.cc +++ b/src/ssl_support.cc @@ -178,8 +178,10 @@ int Ssl::matchX509CommonNames(X509 *peer_cert, void *check_data, int (*check_fun } ASN1_STRING *cn_data = check->d.dNSName; - if ( (*check_func)(check_data, cn_data) == 0) + if ( (*check_func)(check_data, cn_data) == 0) { + sk_GENERAL_NAME_pop_free(altnames, GENERAL_NAME_free); return 1; + } } sk_GENERAL_NAME_pop_free(altnames, GENERAL_NAME_free); }