Same as free_proxy(), but does not free the base proxy pointer (ie: the
proxy itself may not be allocated)
Goal is to be able to cleanup statically allocated dummy proxies.
void stop_proxy(struct proxy *p);
int stream_set_backend(struct stream *s, struct proxy *be);
+void deinit_proxy(struct proxy *p);
void free_proxy(struct proxy *p);
const char *proxy_cap_str(int cap);
const char *proxy_mode_str(int mode);
px->uri_auth = NULL;
}
-void free_proxy(struct proxy *p)
+/* deinit all <p> proxy members, but doesn't touch to the parent pointer
+ * itself
+ */
+void deinit_proxy(struct proxy *p)
{
struct server *s;
struct cap_hdr *h,*h_next;
HA_RWLOCK_DESTROY(&p->lock);
proxy_unref_defaults(p);
+}
+
+/* deinit and free <p> proxy */
+void free_proxy(struct proxy *p)
+{
+ deinit_proxy(p);
ha_free(&p);
}