mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-19 12:10:46 +00:00
BUG/MINOR: ssl: ssl_sock_load_sctl_from_file memory leak
"set ssl cert <filename.sctl> <payload>" CLI command must free previous context. This patch should be backport to 2.1
This commit is contained in:
parent
eb73dc34bb
commit
224a087a27
@ -1606,10 +1606,14 @@ static int ssl_sock_load_sctl_from_file(const char *sctl_path, char *buf, struct
|
||||
sctl = NULL;
|
||||
goto end;
|
||||
}
|
||||
ret = 0;
|
||||
/* TODO: free the previous SCTL in the ckch */
|
||||
/* no error, fill ckch with new context, old context must be free */
|
||||
if (ckch->sctl) {
|
||||
free(ckch->sctl->area);
|
||||
ckch->sctl->area = NULL;
|
||||
free(ckch->sctl);
|
||||
}
|
||||
ckch->sctl = sctl;
|
||||
|
||||
ret = 0;
|
||||
end:
|
||||
if (fd != -1)
|
||||
close(fd);
|
||||
|
Loading…
Reference in New Issue
Block a user