summaryrefslogtreecommitdiffstats
path: root/usr.sbin/iscsid
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2016-09-10 05:42:12 +0000
committerjsg <jsg@openbsd.org>2016-09-10 05:42:12 +0000
commit75b6a596deac819d462d4f4c5aa8c77018cf5d6f (patch)
treee716d798d765ea5b89ed20ae69af6484fef33815 /usr.sbin/iscsid
parentRemove a semicolon after an if statement that resulted in (diff)
downloadwireguard-openbsd-75b6a596deac819d462d4f4c5aa8c77018cf5d6f.tar.xz
wireguard-openbsd-75b6a596deac819d462d4f4c5aa8c77018cf5d6f.zip
fix an fd leak in an error path
Diffstat (limited to 'usr.sbin/iscsid')
-rw-r--r--usr.sbin/iscsid/control.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/iscsid/control.c b/usr.sbin/iscsid/control.c
index e2e0044e832..de090ed5412 100644
--- a/usr.sbin/iscsid/control.c
+++ b/usr.sbin/iscsid/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.9 2016/04/05 00:52:35 yasuoka Exp $ */
+/* $OpenBSD: control.c,v 1.10 2016/09/10 05:42:12 jsg Exp $ */
/*
* Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org>
@@ -74,6 +74,7 @@ control_init(char *path)
if (strlcpy(sun.sun_path, path, sizeof(sun.sun_path)) >=
sizeof(sun.sun_path)) {
log_warnx("control_init: path %s too long", path);
+ close(fd);
return -1;
}