summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Leech <cleech@redhat.com>2019-10-30 14:08:57 -0700
committerChris Leech <cleech@redhat.com>2019-10-31 15:48:08 -0700
commit1a17ffcc07ff7021d66940f58f42bfaa78e763bf (patch)
treea64d5359a07da7f41d0ed051beaa1167cb9f1197
parentca6eb221321c0e24b94f667ecc75a5fc17aa2018 (diff)
downloadopen-iscsi-1a17ffcc07ff7021d66940f58f42bfaa78e763bf.tar.gz
Resource leak: Handle variable fd going out of scope leaks the handle.
-rw-r--r--usr/iscsi_util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/usr/iscsi_util.c b/usr/iscsi_util.c
index 0570dd5..fd8fc0c 100644
--- a/usr/iscsi_util.c
+++ b/usr/iscsi_util.c
@@ -62,6 +62,7 @@ void daemon_init(void)
setsid();
if (chdir("/") < 0)
log_debug(1, "Could not chdir to /: %s", strerror(errno));
+ close(fd);
}
#define ISCSI_OOM_PATH_LEN 48