]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: ssl: update ssl_sock_free_cert_key_and_chain_contents
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 17 Oct 2019 16:04:45 +0000 (18:04 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 23 Oct 2019 09:54:51 +0000 (11:54 +0200)
The struct cert_key_and_chain now contains the DH, the sctl and the
ocsp_response. Free them.

src/ssl_sock.c

index a3829e5d467cd9de0fb7b6074ef1b3ad417206b1..fe607f9e62dcfe373f88abba7abec89b606994fc 100644 (file)
@@ -2931,6 +2931,23 @@ static void ssl_sock_free_cert_key_and_chain_contents(struct cert_key_and_chain
                sk_X509_pop_free(ckch->chain, X509_free);
        ckch->chain = NULL;
 
+       if (ckch->dh)
+               DH_free(ckch->dh);
+       ckch->dh = NULL;
+
+       if (ckch->sctl) {
+               free(ckch->sctl->area);
+               ckch->sctl->area = NULL;
+               free(ckch->sctl);
+               ckch->sctl = NULL;
+       }
+
+       if (ckch->ocsp_response) {
+               free(ckch->ocsp_response->area);
+               ckch->ocsp_response->area = NULL;
+               free(ckch->ocsp_response);
+               ckch->ocsp_response = NULL;
+       }
 }
 
 /* checks if a key and cert exists in the ckch