BUG/MINOR: ssl: fix memory leak at OCSP loading
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 6 Aug 2020 22:44:32 +0000 (00:44 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Aug 2020 09:36:24 +0000 (11:36 +0200)
commit319112b7ab7bf583697ce8ccaafd0c0b5b90066d
tree6adc7dc4bfc1d794ce3989ad80c9e9318fd38b88
parentc02a4d9e79050fbbd8fc06ee169d2fcb56ef0c15
BUG/MINOR: ssl: fix memory leak at OCSP loading

Fix a memory leak when loading an OCSP file when the file was already
loaded elsewhere in the configuration.

Indeed, if the OCSP file already exists, a useless chunk_dup() will be
done during the load.

To fix it we reverts "ocsp" to "iocsp" like it was done previously.

This was introduced by commit 246c024 ("MINOR: ssl: load the ocsp
in/from the ckch").

Should fix part of the issue #746.

It must be backported in 2.1 and 2.2.

(cherry picked from commit 86e4d63316de32b964c8b6b453b549532611e7e5)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 742556f1ae840df317533c0154c5393e09a4d120)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/ssl_sock.c