BUG/MINOR: ssl: Fix fd leak on error path when a TLS ticket keys file is parsed
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 21 Oct 2019 07:55:49 +0000 (09:55 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 21 Oct 2019 08:04:51 +0000 (10:04 +0200)
commite566f3db11e781572382e9bfff088a26dcdb75c5
treeba6efea6abc7ed233663ca107c753f4fe292c969
parentf7f488d8e9740d64cf82b7ef41e55d4f36fe1a43
BUG/MINOR: ssl: Fix fd leak on error path when a TLS ticket keys file is parsed

When an error occurred in the function bind_parse_tls_ticket_keys(), during the
configuration parsing, the opened file is not always closed. To fix the bug, all
errors are catched at the same place, where all ressources are released.

This patch fixes the bug #325. It must be backported as far as 1.7.
src/ssl_sock.c