From: William Lallemand Date: Fri, 20 Aug 2021 08:16:37 +0000 (+0200) Subject: MINOR: proxy: check if p is NULL in free_proxy() X-Git-Tag: v2.5-dev5~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0281a49;p=thirdparty%2Fhaproxy.git MINOR: proxy: check if p is NULL in free_proxy() Check if p is NULL before trying to do anything in free_proxy(), like most free()-like function do. --- diff --git a/src/proxy.c b/src/proxy.c index 237f297d75..87999ad5d3 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -144,6 +144,9 @@ void free_proxy(struct proxy *p) struct proxy_deinit_fct *pxdf; struct server_deinit_fct *srvdf; + if (!p) + return; + free(p->conf.file); free(p->id); free(p->cookie_name);