mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
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:
parent
a7bf573520
commit
909086ea61
@ -4846,10 +4846,8 @@ static int crtlist_parse_file(char *file, struct bind_conf *bind_conf, struct pr
|
|||||||
else
|
else
|
||||||
ckchs = ckchs_load_cert_file(crt_path, 1, err);
|
ckchs = ckchs_load_cert_file(crt_path, 1, err);
|
||||||
}
|
}
|
||||||
if (ckchs == NULL) {
|
if (ckchs == NULL)
|
||||||
cfgerr |= ERR_ALERT | ERR_FATAL;
|
cfgerr |= ERR_ALERT | ERR_FATAL;
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
|
|
||||||
entry = malloc(sizeof(*entry));
|
entry = malloc(sizeof(*entry));
|
||||||
if (entry == NULL) {
|
if (entry == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user