mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-23 14:51:27 +02:00
BUG/MINOR: ssl: memory leak when trying to load a directory with ca-file
This patch fixes a memory leak of the ca structure when trying to load a directory with the ca-file directive. No backport needed.
This commit is contained in:
parent
b0c4827c2f
commit
4cfbf3c014
@ -1168,11 +1168,13 @@ int ssl_store_load_locations_file(char *path, int create_if_none, enum cafile_ty
|
||||
if (X509_STORE_add_cert(store, ca) == 0)
|
||||
goto scandir_err;
|
||||
|
||||
X509_free(ca);
|
||||
BIO_free(in);
|
||||
free(de);
|
||||
continue;
|
||||
|
||||
scandir_err:
|
||||
X509_free(ca);
|
||||
BIO_free(in);
|
||||
free(de);
|
||||
ha_warning("ca-file: '%s' couldn't load '%s'\n", path, trash.area);
|
||||
|
Loading…
x
Reference in New Issue
Block a user