From cef357b350d0f866ab1c9772b16c0680fb361f18 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 20 Mar 2008 11:01:18 +0100 Subject: [PATCH] configfile.c: Fixed a memory leak in cf_read_generic(). In case stat(2) failed, the memory allocated for the return value has not been freed. Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- src/configfile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/configfile.c b/src/configfile.c index 18c82d94..ef997fac 100644 --- a/src/configfile.c +++ b/src/configfile.c @@ -617,6 +617,7 @@ static oconfig_item_t *cf_read_generic (const char *path, int depth) ERROR ("configfile: stat (%s) failed: %s", path_ptr, sstrerror (errno, errbuf, sizeof (errbuf))); + oconfig_free (root); return (NULL); } -- 2.30.2