aboutsummaryrefslogtreecommitdiff
path: root/lib/utils_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils_cmd.c')
-rw-r--r--lib/utils_cmd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/utils_cmd.c b/lib/utils_cmd.c
index 4c6d0be1..9e214bd4 100644
--- a/lib/utils_cmd.c
+++ b/lib/utils_cmd.c
@@ -390,6 +390,9 @@ cmd_file_read ( char *filename, output *out, int flags)
if(out)
out->lines = _cmd_fetch_output (fd, out, flags);
+
+ if (close(fd) == -1)
+ die( STATE_UNKNOWN, _("Error closing %s: %s"), filename, strerror(errno) );
return 0;
}