Confbuf[2048] = '\0';
ProcessLine(Confbuf);
}
+ fclose(ConfigFile);
/*
* Check that at least one server is being queried. Report error if not.
syslog(LOG_ERR, "OpenConfigFile: No servers set in %s. At least one is needed.", CONFIGFILE);
return 1;
}
- fclose(ConfigFile);
return 0;
}
* Clear the allowed user string. Return. */
if (fstat(fileno(fp), &FileBuf) < 0) {
syslog(LOG_ERR, "%s: %s", path, strerror(errno));
+ fclose(fp);
return 1;
}
/* If it exists, save the modification time and size */
uf->LMT = FileBuf.st_mtime;
/* Handle the special case of a zero length file */
- if (FileBuf.st_size == 0)
+ if (FileBuf.st_size == 0) {
+ fclose(fp);
return 0;
+ }
/*
* Read the file into memory