mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-07 09:42:34 +00: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
@ -608,6 +608,11 @@ int crtlist_parse_file(char *file, struct bind_conf *bind_conf, struct proxy *cu
|
|||||||
found++;
|
found++;
|
||||||
free(cc.crt);
|
free(cc.crt);
|
||||||
cc.crt = strdup(crt_path);
|
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);
|
ckchs = ckch_store_new_load_files_conf(crt_path, &cc, err);
|
||||||
if (ckchs == NULL) {
|
if (ckchs == NULL) {
|
||||||
cfgerr |= ERR_ALERT | ERR_FATAL;
|
cfgerr |= ERR_ALERT | ERR_FATAL;
|
||||||
|
Loading…
Reference in New Issue
Block a user