]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: ssl: initialize all list in ckch_inst_new()
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 9 Apr 2020 14:25:10 +0000 (16:25 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Thu, 9 Apr 2020 14:46:50 +0000 (16:46 +0200)
The ckch_inst_new() function is not up to date with the latest
list added into the structure. Update the list of structure to
initialize.

src/ssl_sock.c

index 8f84c676bf3a8230b6509622d010a416df322441..a09e437c77d40d6efe10b74f145273703ec00621 100644 (file)
@@ -2904,8 +2904,12 @@ static struct ckch_inst *ckch_inst_new()
        struct ckch_inst *ckch_inst;
 
        ckch_inst = calloc(1, sizeof *ckch_inst);
-       if (ckch_inst)
-               LIST_INIT(&ckch_inst->sni_ctx);
+       if (!ckch_inst)
+               return NULL;
+
+       LIST_INIT(&ckch_inst->sni_ctx);
+       LIST_INIT(&ckch_inst->by_ckchs);
+       LIST_INIT(&ckch_inst->by_crtlist_entry);
 
        return ckch_inst;
 }