mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 23:31:40 +02: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;
|
sctl = NULL;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
ret = 0;
|
/* no error, fill ckch with new context, old context must be free */
|
||||||
/* TODO: free the previous SCTL in the ckch */
|
if (ckch->sctl) {
|
||||||
|
free(ckch->sctl->area);
|
||||||
|
ckch->sctl->area = NULL;
|
||||||
|
free(ckch->sctl);
|
||||||
|
}
|
||||||
ckch->sctl = sctl;
|
ckch->sctl = sctl;
|
||||||
|
ret = 0;
|
||||||
end:
|
end:
|
||||||
if (fd != -1)
|
if (fd != -1)
|
||||||
close(fd);
|
close(fd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user