From b0281a490359d00356c81dc53f09e9aa0f5fbda5 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Fri, 20 Aug 2021 10:16:37 +0200 Subject: [PATCH] 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. --- src/proxy.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.39.5