projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a7bf573
)
BUG/MINOR: ssl: memory leak in crtlist_parse_file()
author
William Lallemand
<wlallemand@haproxy.com>
Tue, 17 Mar 2020 15:53:27 +0000
(16:53 +0100)
committer
William Lallemand
<wlallemand@haproxy.org>
Tue, 17 Mar 2020 15:57:34 +0000
(16:57 +0100)
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.
src/ssl_sock.c
patch
|
blob
|
history
diff --git
a/src/ssl_sock.c
b/src/ssl_sock.c
index
8d3434a
..
2c7892c
100644
(file)
--- a/
src/ssl_sock.c
+++ b/
src/ssl_sock.c
@@
-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) {