From: Willy Tarreau Date: Fri, 3 Sep 2010 08:38:17 +0000 (+0200) Subject: [BUG] deinit: unbind listeners before freeing them X-Git-Tag: v1.5-dev8~471 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6e2cc79d87a475c1b3e5049b1b178581121ff0e;p=thirdparty%2Fhaproxy.git [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. --- 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);