BUG/MINOR: ssl: free the fields in srv->ssl_ctx
authorWilliam Lallemand <wlallemand@haproxy.org>
Thu, 30 Dec 2021 10:25:43 +0000 (11:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 10 Jan 2022 07:51:07 +0000 (08:51 +0100)
commit341cb2a9b768ec86b234f75bc87e26eae18d3d4a
treeb1c132b5e0c05de08d964d789d017e9170a686e1
parent51b7c93de3301d93b6a40f2e413d9b9e2c9b96ef
BUG/MINOR: ssl: free the fields in srv->ssl_ctx

A lot of free are missing in ssl_sock_free_srv_ctx(), this could result
in memory leaking when removing dynamically a server via the CLI.

This must be backported in every branches, by removing the fields that
does not exist in the previous branches.

(cherry picked from commit 231610ad9ccc2470930f7a728ba710a548677a65)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 8ccdbad9967b08b1f5afe89b461335b16436ecdb)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 9d11868086ab45690e561acb50ccd0ad569354b7)
[wt: changed ha_free(&x) to free(x);x=NULL]
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/ssl_sock.c