aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2015-10-17 09:07:53 +0000
committerEnji Cooper <ngie@FreeBSD.org>2015-10-17 09:07:53 +0000
commit211d866621194e58548a29ce3ab960f2022deb11 (patch)
tree5116318b7f15038121ac6478177af7e2d6821a2c /lib
parent3f18b7fa1262ecd3a8e5ca8a1f5569d2115e8c42 (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libcam/camlib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libcam/camlib.c b/lib/libcam/camlib.c
index f3202470a0e2..b7024a6d6097 100644
--- a/lib/libcam/camlib.c
+++ b/lib/libcam/camlib.c
@@ -676,8 +676,10 @@ cam_close_spec_device(struct cam_device *dev)
if (dev == NULL)
return;
- if (dev->fd >= 0)
+ if (dev->fd >= 0) {
close(dev->fd);
+ dev->fd = -1;
+ }
}
char *