BUG/MINOR: ssl/cli: fix a lock leak when no memory available
authorWilliam Lallemand <wlallemand@haproxy.org>
Tue, 4 May 2021 14:17:27 +0000 (16:17 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Tue, 4 May 2021 14:40:44 +0000 (16:40 +0200)
commit5ba80d677d563517bb9754c272e6df94adae281b
tree9defbf7d24b8441b9b35b88b3fea13bdf7fdd0bf
parent18b2a9dd874b66acca304580047fa6b3c16da1e3
BUG/MINOR: ssl/cli: fix a lock leak when no memory available

This bug was introduced in e5ff4ad ("BUG/MINOR: ssl: fix a trash buffer
leak in some error cases").

When cli_parse_set_cert() returns because alloc_trash_chunk() failed, it
does not unlock the spinlock which can lead to a deadlock later.

Must be backported as far as 2.1 where e5ff4ad was backported.
src/ssl_ckch.c