From 490112b74bf3ecfb291ad4d22a26eb4ffc1aee89 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Thu, 9 Sep 2010 14:49:01 +0200 Subject: [PATCH] Close file on error condition --- src/main/conffile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/conffile.c b/src/main/conffile.c index ee47afb..5157f14 100644 --- a/src/main/conffile.c +++ b/src/main/conffile.c @@ -1710,6 +1710,7 @@ int cf_file_include(const char *filename, CONF_SECTION *cs) } if (cf_data_find_internal(cs, filename, PW_TYPE_FILENAME)) { + fclose(fp); radlog(L_ERR, "Cannot include the same file twice: \"%s\"", filename); return -1; -- 2.1.4