From f6e2cc79d87a475c1b3e5049b1b178581121ff0e Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 3 Sep 2010 10:38:17 +0200 Subject: [PATCH] [BUG] deinit: unbind listeners before freeing them In deinit(), it is possible that we first free the listeners, then unbind them all. Right now this situation can't happen because the only way to call deinit() is to pass via a soft-stop which will already unbind all protocols. But later this might become a problem. --- src/haproxy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/haproxy.c b/src/haproxy.c index 3ceb3980b2..2298ee141c 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -813,6 +813,8 @@ void deinit(void) l = p->listen; while (l) { l_next = l->next; + unbind_listener(l); + delete_listener(l); free(l->name); free(l->counters); free(l); -- 2.47.3