tidying: coverity issues
[exim.git] / src / src / spool_out.c
index 8d0ee7c719a19ba2a204440ca036a6f0622859f2..62909915ffe4d68f5db5df18ad93fdd8c6988015 100644 (file)
@@ -329,7 +329,8 @@ if (EXIMfsync(fileno(f)) < 0)
 
 /* Get the size of the file, and close it. */
 
-fstat(fd, &statbuf);
+if (fstat(fd, &statbuf) != 0)
+  return spool_write_error(where, errmsg, US"fstat", temp_name, NULL);
 if (fclose(f) != 0)
   return spool_write_error(where, errmsg, US"close", temp_name, NULL);