mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
CLEANUP: ssl: Release cached SSL sessions on deinit
On deinit, when the server SSL ctx is released, we must take care to release the cached SSL sessions stored in the array <ssl_ctx.reused_sess>. There are global.nbthread entries in this array, each one may have a pointer on a cached session. This patch should fix the issue #802. No backport needed.
This commit is contained in:
parent
d7c6e6a71d
commit
58feb49ed2
1 changed files with 8 additions and 0 deletions
|
|
@ -4721,6 +4721,14 @@ void ssl_sock_free_srv_ctx(struct server *srv)
|
|||
if (srv->ssl_ctx.npn_str)
|
||||
free(srv->ssl_ctx.npn_str);
|
||||
#endif
|
||||
if (srv->ssl_ctx.reused_sess) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < global.nbthread; i++)
|
||||
free(srv->ssl_ctx.reused_sess[i].ptr);
|
||||
free(srv->ssl_ctx.reused_sess);
|
||||
}
|
||||
|
||||
if (srv->ssl_ctx.ctx)
|
||||
SSL_CTX_free(srv->ssl_ctx.ctx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue