BUG/MINOR: ssl_sock: fix possible memory leak on OOM

That's the classical realloc() issue: if it returns NULL, the old area
is not freed but we erase the pointer. It was brought by commit e18d4e828
("BUG/MEDIUM: ssl: backend TLS resumption with sni and TLSv1.3"), and
should be backported where this commit was backported.

(cherry picked from commit ff9e6538590ef26fd03a75474a7e1d2405f53fdd)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 94d7f8af8dcff1b4707000477a3dc77c0fbf59a2)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 1741f226ecb27ece2f036a79478115a4610e8ef6)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit ee5d6a0ef2da7a2b47ffcf9a3ca965290d8ea5f4)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed