From: William Lallemand Date: Fri, 10 Apr 2020 15:13:09 +0000 (+0200) Subject: BUG/MINOR: ssl: ssl_conf always set to NULL on crt-list parsing X-Git-Tag: v2.2-dev6~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=87a0db9993b057b1fe7309ddedda7de0f55d6be2;p=thirdparty%2Fhaproxy.git BUG/MINOR: ssl: ssl_conf always set to NULL on crt-list parsing When reading a crt-list file, the SSL options betweeen square brackets are parsed, however the calling function sets the ssl_conf ptr to NULL leading to all options being ignored, and a memory leak. This is a remaining of the previous code which was forgotten. This bug was introduced by 97b0810 ("MINOR: ssl: split the line parsing of the crt-list"). --- diff --git a/src/ssl_sock.c b/src/ssl_sock.c index af80a757f5..1cd701e613 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -4862,7 +4862,6 @@ static int crtlist_parse_file(char *file, struct bind_conf *bind_conf, struct pr char *end; char *line = thisline; char *crt_path; - struct ssl_bind_conf *ssl_conf = NULL; struct ckch_store *ckchs; linenum++; @@ -4925,7 +4924,6 @@ static int crtlist_parse_file(char *file, struct bind_conf *bind_conf, struct pr goto error; entry->node.key = ckchs; - entry->ssl_conf = ssl_conf; entry->crtlist = newlist; ebpt_insert(&newlist->entries, &entry->node); LIST_ADDQ(&newlist->ord_entries, &entry->by_crtlist);