summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvincent <vincent@openbsd.org>2002-06-12 20:09:43 +0000
committervincent <vincent@openbsd.org>2002-06-12 20:09:43 +0000
commitbeed7294fa051b34b38ba51727f57752d9bec050 (patch)
tree7b86771850d999bc3568ead24dc089ed2bc5c490
parentAdd ddb subdir, and alphabeticize them (diff)
downloadwireguard-openbsd-beed7294fa051b34b38ba51727f57752d9bec050.tar.xz
wireguard-openbsd-beed7294fa051b34b38ba51727f57752d9bec050.zip
fix a typo that could create a fd leak
ok beck@
-rw-r--r--usr.sbin/authpf/authpf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/authpf/authpf.c b/usr.sbin/authpf/authpf.c
index f83595e9c8b..d4fce200578 100644
--- a/usr.sbin/authpf/authpf.c
+++ b/usr.sbin/authpf/authpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authpf.c,v 1.21 2002/06/11 17:13:55 beck Exp $ */
+/* $OpenBSD: authpf.c,v 1.22 2002/06/12 20:09:43 vincent Exp $ */
/*
* Copyright (C) 1998 - 2002 Bob Beck (beck@openbsd.org).
@@ -177,7 +177,7 @@ main(int argc, char *argv[])
if ((pidfd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1 ||
(pidfp = fdopen(pidfd, "r+")) == NULL) {
- if (pidfd == -1)
+ if (pidfd != -1)
close(pidfd);
syslog(LOG_ERR, "can't open or create %s: %s", pidfile,
strerror(errno));