mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-11 14:53:05 -05:00
BUG/MINOR: ssl_crtlist: handle a possible strdup() failure
This defect was found by the coccinelle script "unchecked-strdup.cocci". It can be backported to all supported branches.
This commit is contained in:
parent
abee546850
commit
ce30bc1730
1 changed files with 5 additions and 0 deletions
|
|
@ -608,6 +608,11 @@ int crtlist_parse_file(char *file, struct bind_conf *bind_conf, struct proxy *cu
|
|||
found++;
|
||||
free(cc.crt);
|
||||
cc.crt = strdup(crt_path);
|
||||
if (cc.crt == NULL) {
|
||||
cfgerr |= ERR_ALERT | ERR_FATAL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
ckchs = ckch_store_new_load_files_conf(crt_path, &cc, err);
|
||||
if (ckchs == NULL) {
|
||||
cfgerr |= ERR_ALERT | ERR_FATAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue