mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-29 06:40:59 +01:00
BUG/MINOR: server: Memory leak of proxy.used_server_addr during deinit
GitHub Issue #1037 Reported a memory leak in deinit() caused by an allocation made in sa2str() that was stored in srv_set_addr_desc(). When destroying each server for a proxy in deinit, include freeing the memory in the key of server->addr_node. The leak was introduced in commit 92149f9a8 ("MEDIUM: stick-tables: Add srvkey option to stick-table") which is not in any released version so no backport is needed. Cc: Tim Duesterhus <tim@bastelstu.be>
This commit is contained in:
parent
591fc3a330
commit
4fb255df03
@ -2649,6 +2649,7 @@ void deinit(void)
|
|||||||
free(s->available_conns);
|
free(s->available_conns);
|
||||||
free(s->curr_idle_thr);
|
free(s->curr_idle_thr);
|
||||||
free(s->resolvers_id);
|
free(s->resolvers_id);
|
||||||
|
free(s->addr_node.key);
|
||||||
|
|
||||||
if (s->use_ssl == 1 || s->check.use_ssl == 1 || (s->proxy->options & PR_O_TCPCHK_SSL)) {
|
if (s->use_ssl == 1 || s->check.use_ssl == 1 || (s->proxy->options & PR_O_TCPCHK_SSL)) {
|
||||||
if (xprt_get(XPRT_SSL) && xprt_get(XPRT_SSL)->destroy_srv)
|
if (xprt_get(XPRT_SSL) && xprt_get(XPRT_SSL)->destroy_srv)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user