mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-01 12:51:09 -05:00
BUG/MINOR: ssl: ssl_sock_load_ocsp_response_from_file memory leak
"set ssl cert <filename.ocsp> <payload>" CLI command must free previous context. This patch should be backport to 2.1
This commit is contained in:
parent
ebf840bf37
commit
0667faebcf
1 changed files with 6 additions and 1 deletions
|
|
@ -1106,7 +1106,12 @@ static int ssl_sock_load_ocsp_response_from_file(const char *ocsp_path, char *bu
|
|||
ocsp_response = NULL;
|
||||
goto end;
|
||||
}
|
||||
|
||||
/* no error, fill ckch with new context, old context must be free */
|
||||
if (ckch->ocsp_response) {
|
||||
free(ckch->ocsp_response->area);
|
||||
ckch->ocsp_response->area = NULL;
|
||||
free(ckch->ocsp_response);
|
||||
}
|
||||
ckch->ocsp_response = ocsp_response;
|
||||
ret = 0;
|
||||
end:
|
||||
|
|
|
|||
Loading…
Reference in a new issue