summaryrefslogtreecommitdiff
path: root/util/ipmidir.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-02-17 20:56:52 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-02-17 20:56:52 +0100
commitd3c90cdcdf56146af89056ed36bfcc7b4d4956c5 (patch)
tree501b20343861a704020ca37b8e65fd2211dcb353 /util/ipmidir.c
parentee6c7128ed0d58cb1812049463a13bba9cfb31b7 (diff)
Imported Upstream version 2.9.8upstream/2.9.8
Diffstat (limited to 'util/ipmidir.c')
-rw-r--r--util/ipmidir.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/ipmidir.c b/util/ipmidir.c
index 501f47b..2aeb6f3 100644
--- a/util/ipmidir.c
+++ b/util/ipmidir.c
@@ -473,8 +473,10 @@ int ipmi_close_direct(void)
{
int status = 0;
#if defined(BSD) || defined(MACOS) || defined(HPUX)
- close(iofd);
- iofd = -1;
+ if (iofd >= 0) {
+ close(iofd);
+ iofd = -1;
+ }
#endif
/* clear lock for driverless interface */
status = clear_lock_dir();