diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-09-10 05:42:13 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-09-10 05:42:13 +0000 |
commit | 5f3ff35be3e327d610a6a39de18342d40b78837d (patch) | |
tree | cfeedafc7bea7b326eadc8cc3139ef0c34466ceb /usr.sbin | |
parent | 9b5cad622dcf10389c36e934d991f68b18cb2521 (diff) |
fix an fd leak in an error path
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/iscsid/control.c | 3 |
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; } |