mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 22:31:28 +02:00
MINOR: ssl: don't alloc ssl_conf if no option found
When no SSL options were found between brackets, the structure ssl_conf was still allocated for nothing.
This commit is contained in:
parent
87a0db9993
commit
1b2988bc42
@ -4784,11 +4784,13 @@ static int crtlist_parse_line(char *line, char **crt_path, struct crtlist_entry
|
|||||||
|
|
||||||
*crt_path = args[0];
|
*crt_path = args[0];
|
||||||
|
|
||||||
ssl_conf = calloc(1, sizeof *ssl_conf);
|
if (ssl_b) {
|
||||||
if (!ssl_conf) {
|
ssl_conf = calloc(1, sizeof *ssl_conf);
|
||||||
memprintf(err, "not enough memory!");
|
if (!ssl_conf) {
|
||||||
cfgerr |= ERR_ALERT | ERR_FATAL;
|
memprintf(err, "not enough memory!");
|
||||||
goto error;
|
cfgerr |= ERR_ALERT | ERR_FATAL;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cur_arg = ssl_b ? ssl_b : 1;
|
cur_arg = ssl_b ? ssl_b : 1;
|
||||||
while (cur_arg < ssl_e) {
|
while (cur_arg < ssl_e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user