]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: Fix double free in ocsp update deinit
authorRemi Tricot-Le Breton <rlebreton@haproxy.com>
Mon, 13 Mar 2023 14:56:33 +0000 (15:56 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Tue, 14 Mar 2023 10:07:32 +0000 (11:07 +0100)
If the last update before a deinit happens was successful, the pointer
to the httpclient in the ocsp update context was not reset while the
httpclient instance was already destroyed.

src/ssl_ocsp.c

index c348681029820aa278844d9785ba0c0a58d2f5ab..14fb7e9153e6bb2db1d31106a7c1f272724e011b 100644 (file)
@@ -1273,6 +1273,7 @@ leave:
        }
        if (hc)
                httpclient_stop_and_destroy(hc);
+       ctx->hc = NULL;
        free_trash_chunk(req_url);
        free_trash_chunk(req_body);
        task->expire = tick_add(now_ms, next_wakeup);