From ea59acf4cfdd18e583294f4212c7e842d2f7b7ac Mon Sep 17 00:00:00 2001 From: Johan Bloemberg Date: Fri, 21 Jun 2024 15:30:43 +0200 Subject: [PATCH] Fix memory leak in OCSP response basic_verify --- nassl/_nassl/nassl_OCSP_RESPONSE.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nassl/_nassl/nassl_OCSP_RESPONSE.c b/nassl/_nassl/nassl_OCSP_RESPONSE.c index f316d29..dbc70a0 100755 --- a/nassl/_nassl/nassl_OCSP_RESPONSE.c +++ b/nassl/_nassl/nassl_OCSP_RESPONSE.c @@ -139,6 +139,7 @@ static PyObject* nassl_OCSP_RESPONSE_basic_verify(nassl_OCSP_RESPONSE_Object *se verifyRes = OCSP_basic_verify(basicResp, NULL, trustedCAs, 0); OCSP_BASICRESP_free(basicResp); + X509_STORE_free(trustedCAs); if (verifyRes <= 0) { return raise_OpenSSL_error();