BUG/MINOR: ssl: memory leak in crtlist_parse_file()

A memory leak happens in an error case when ckchs_load_cert_file()
returns NULL in crtlist_parse_file().

This bug was introduced by commit 2954c47 ("MEDIUM: ssl: allow crt-list caching")

This patch fixes bug #551.
This commit is contained in:
William Lallemand 2020-03-17 16:53:27 +01:00 committed by William Lallemand
parent a7bf573520
commit 909086ea61

View File

@ -4846,10 +4846,8 @@ static int crtlist_parse_file(char *file, struct bind_conf *bind_conf, struct pr
else
ckchs = ckchs_load_cert_file(crt_path, 1, err);
}
if (ckchs == NULL) {
if (ckchs == NULL)
cfgerr |= ERR_ALERT | ERR_FATAL;
goto error;
}
entry = malloc(sizeof(*entry));
if (entry == NULL) {