diff options
| author | 2004-04-03 10:21:57 +0000 | |
|---|---|---|
| committer | 2004-04-03 10:21:57 +0000 | |
| commit | 7bca24f91ab3cbdd5ce8dcb97151cea631c9c1de (patch) | |
| tree | 65db9dd7985edbbc46f31fa0aa7f182e1157c3bc | |
| parent | dont close an invalid fd, canacar@ ok (diff) | |
| download | wireguard-openbsd-7bca24f91ab3cbdd5ce8dcb97151cea631c9c1de.tar.xz wireguard-openbsd-7bca24f91ab3cbdd5ce8dcb97151cea631c9c1de.zip | |
dont try to close an invalid fd, canacar@ ok
| -rw-r--r-- | usr.sbin/bind/lib/isc/unix/privsep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bind/lib/isc/unix/privsep.c b/usr.sbin/bind/lib/isc/unix/privsep.c index 8e186436b87..65438fb6577 100644 --- a/usr.sbin/bind/lib/isc/unix/privsep.c +++ b/usr.sbin/bind/lib/isc/unix/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.2 2004/03/19 20:36:28 canacar Exp $ */ +/* $OpenBSD: privsep.c,v 1.3 2004/04/03 10:21:57 avsm Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -222,7 +222,8 @@ parent_bind(int fd) must_write(fd, &er, sizeof(er)); must_write(fd, &status, sizeof(status)); - close(sock); + if (sock >= 0) + close(sock); } /* Bind to allowed privileged ports using privsep, or try to bind locally */ |
