summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Labrecque <vincent@cvs.openbsd.org>2002-06-12 20:09:44 +0000
committerVincent Labrecque <vincent@cvs.openbsd.org>2002-06-12 20:09:44 +0000
commit418dc9720af622d409c33dd35608dc579441a06f (patch)
treec4db341f0eeca52f89abcfd8dc7b32dd0dcf0bac
parentba74d751a94ba1642cc2210fc641fe49976269bb (diff)
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));