diff --git a/src/proxy.c b/src/proxy.c index 48090128d..8d87bf85c 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -213,6 +213,8 @@ static inline void proxy_free_common(struct proxy *px) struct lf_expr *lf, *lfb; struct eb32_node *node; + /* note that the node's key points to p->id */ + ebpt_delete(&px->conf.by_name); ha_free(&px->id); drop_file_name(&px->conf.file); ha_free(&px->check_command); @@ -414,10 +416,6 @@ void deinit_proxy(struct proxy *p) free(p->desc); - /* note that the node's key points to p->id */ - ebpt_delete(&p->conf.by_name); - free(p->id); - task_destroy(p->task); pool_destroy(p->req_cap_pool);