Close file on error condition
authorAlan T. DeKok <aland@freeradius.org>
Thu, 9 Sep 2010 12:49:01 +0000 (14:49 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 9 Sep 2010 13:29:02 +0000 (15:29 +0200)
src/main/conffile.c

index ee47afb..5157f14 100644 (file)
@@ -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;