summaryrefslogtreecommitdiffstats
path: root/support/nsm/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'support/nsm/file.c')
-rw-r--r--support/nsm/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/support/nsm/file.c b/support/nsm/file.c
index 4711c2c..7a8b504 100644
--- a/support/nsm/file.c
+++ b/support/nsm/file.c
@@ -536,7 +536,8 @@ nsm_get_state(_Bool update)
state++;
update:
- (void)close(fd);
+ if(fd >= 0)
+ (void)close(fd);
if (update) {
state += 2;