This changes commit
d2a9149f0 ("BUG/MINOR: proxy: always detach a proxy
from the names tree on free()") to be cleaner. Aurélien spotted that
the free(p->id) was indeed already done in proxy_free_common(), which is
called before we delete the node. That's still a bit ugly and it only
works because ebpt_delete() does not dereference the key during the
operation. Better play safe and delete the entry before freeing it,
that's more future-proof.
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);
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);