From 24a9ac33419d4cb2dcfc474af9b5ec7ce3f4fddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Svensson?= Date: Fri, 11 Feb 2022 16:26:02 +0100 Subject: [PATCH] Avoid leaks after errors in freebsd config handler Freeing allocated memory in an error flow. Currently this would most likely not occure but a safeguard for future changes. --- lib/ff_config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ff_config.c b/lib/ff_config.c index ed9de2ba3..441b46c4e 100644 --- a/lib/ff_config.c +++ b/lib/ff_config.c @@ -191,6 +191,7 @@ freebsd_conf_handler(struct ff_config *cfg, const char *section, } } else { fprintf(stderr, "freebsd conf section[%s] error\n", section); + free(newconf); return 0; }