]> granicus.if.org Git - fcron/blobdiff - conf.c
Fixed bug in logging to a file and made file closure more robust
[fcron] / conf.c
diff --git a/conf.c b/conf.c
index 7085270ea4ea466735ccdea9a45cb1c32d18ae05..48f851f40fd470e3633aad06f84e1356d0aab591 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -748,13 +748,13 @@ read_file(const char *file_name, cf_t * cf, int is_system_startup)
         error("file %s is truncated : you should reinstall it with fcrontab",
               file_name);
 
-    fclose(ff);
+    xfclose_check(&ff, file_name);
 
     return OK;
 
  err:
     if (ff != NULL)
-        fclose(ff);
+        xfclose_check(&ff, file_name);
 
     if (cl != NULL && cl->cl_next == NULL) {
         /* line is not yet in the line list of the file : free it */