mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
MINOR: ssl: use crtlist_free() upon error in directory loading
Replace the manual cleaninp which is done in crtlist_load_cert_dir() by a call to the crtlist_free() function.
This commit is contained in:
parent
4c68bba5c1
commit
09bd5a0787
@ -4674,18 +4674,7 @@ end:
|
|||||||
|
|
||||||
if (cfgerr & ERR_CODE) {
|
if (cfgerr & ERR_CODE) {
|
||||||
/* free the dir and entries on error */
|
/* free the dir and entries on error */
|
||||||
struct ebpt_node *node;
|
crtlist_free(dir);
|
||||||
|
|
||||||
node = ebpt_first(&dir->entries);
|
|
||||||
while (node) {
|
|
||||||
struct crtlist_entry *entry;
|
|
||||||
|
|
||||||
entry = ebpt_entry(node, typeof(*entry), node);
|
|
||||||
node = ebpt_next(node);
|
|
||||||
ebpt_delete(&entry->node);
|
|
||||||
free(entry);
|
|
||||||
}
|
|
||||||
free(dir);
|
|
||||||
} else {
|
} else {
|
||||||
*crtlist = dir;
|
*crtlist = dir;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user