MINOR: proxy: move the defproxy freeing code to proxy.c
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Feb 2021 09:38:49 +0000 (10:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Feb 2021 15:23:46 +0000 (16:23 +0100)
commita3320a0509f16beda2c93a98cf49d45a5d9bda88
tree8acf2ca816deb0bc140cec64b701cba881613ce4
parent3b06eaec8659d24aebe653e02bbdf1084e6dfd32
MINOR: proxy: move the defproxy freeing code to proxy.c

This used to be open-coded in cfgparse-listen.c when facing a "defaults"
keyword. Let's move this into proxy_free_defaults(). This code is ugly and
doesn't even reset the just freed pointers. Let's not change this yet.

This code should probably be merged with a generic proxy deinit function
called from deinit(). However there's a catch on uri_auth which cannot be
freed because it might be used by one or several proxies. We definitely
need refcounts there!
include/haproxy/proxy.h
src/cfgparse-listen.c
src/proxy.c