mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-18 10:08:36 -05: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
1 changed files with 1 additions and 0 deletions
|
|
@ -2649,6 +2649,7 @@ void deinit(void)
|
|||
free(s->available_conns);
|
||||
free(s->curr_idle_thr);
|
||||
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 (xprt_get(XPRT_SSL) && xprt_get(XPRT_SSL)->destroy_srv)
|
||||
|
|
|
|||
Loading…
Reference in a new issue