BUG/MINOR: server: perform lbprm deinit for dynamic servers
Last commit 7361515 ("BUG/MINOR: server: dont depend on proxy for server cleanup in srv_drop()") introduced a regression because the lbprm server_deinit is not evaluated anymore with dynamic servers, possibly resulting in a memory leak. To fix the issue, in addition to free_proxy(), the server deinit check should be manually performed in cli_parse_delete_server() as well. No backport needed.
This commit is contained in:
parent
736151556c
commit
c40d6ac840
@ -6276,6 +6276,9 @@ static int cli_parse_delete_server(char **args, char *payload, struct appctx *ap
|
|||||||
if (srv->agent.state & CHK_ST_CONFIGURED)
|
if (srv->agent.state & CHK_ST_CONFIGURED)
|
||||||
check_purge(&srv->agent);
|
check_purge(&srv->agent);
|
||||||
|
|
||||||
|
if (srv->proxy->lbprm.server_deinit)
|
||||||
|
srv->proxy->lbprm.server_deinit(srv);
|
||||||
|
|
||||||
while (!MT_LIST_ISEMPTY(&srv->watcher_list)) {
|
while (!MT_LIST_ISEMPTY(&srv->watcher_list)) {
|
||||||
srv_watch = MT_LIST_NEXT(&srv->watcher_list, struct watcher *, el);
|
srv_watch = MT_LIST_NEXT(&srv->watcher_list, struct watcher *, el);
|
||||||
BUG_ON(srv->next && srv->next->flags & SRV_F_DELETED);
|
BUG_ON(srv->next && srv->next->flags & SRV_F_DELETED);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user