]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: memory leak w/ the ocsp_issuer
authorWilliam Lallemand <wlallemand@haproxy.org>
Thu, 23 Jan 2020 10:53:13 +0000 (11:53 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Thu, 23 Jan 2020 10:57:39 +0000 (11:57 +0100)
This patch frees the ocsp_issuer in
ssl_sock_free_cert_key_and_chain_contents().

Shoudl be backported in 2.1.

src/ssl_sock.c

index db9621b21bf5e8a9f8ddf52d00f172a7d27ec446..38e95fad28702a5318e925278a6e9ab00141334f 100644 (file)
@@ -3126,6 +3126,10 @@ static void ssl_sock_free_cert_key_and_chain_contents(struct cert_key_and_chain
                free(ckch->ocsp_response);
                ckch->ocsp_response = NULL;
        }
+
+       if (ckch->ocsp_issuer)
+               X509_free(ocsp_issuer);
+       ckch->ocsp_issuer = NULL;
 }
 
 /*