summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2004-02-26 08:52:59 +0000
committerBob Beck <beck@cvs.openbsd.org>2004-02-26 08:52:59 +0000
commitfcec2f54ae37c4320378b7e1da683d10998ab3c5 (patch)
treea06346a095e17ec1d681515be18a89bf0cec0d11 /libexec
parenta779ffbf1ea5ac39419a5010a7506ee339082ca6 (diff)
don't leak one here either.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/spamd/grey.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libexec/spamd/grey.c b/libexec/spamd/grey.c
index e64edac256d..0c678b907e0 100644
--- a/libexec/spamd/grey.c
+++ b/libexec/spamd/grey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grey.c,v 1.4 2004/02/26 08:50:40 beck Exp $ */
+/* $OpenBSD: grey.c,v 1.5 2004/02/26 08:52:58 beck Exp $ */
/*
* Copyright (c) 2004 Bob Beck. All rights reserved.
@@ -426,7 +426,8 @@ greywatcher(void)
/* if we are dropping privs, chown to that user */
if (pw && (fchown(i, pw->pw_uid, pw->pw_gid) == -1))
err(1, "can't chown %s", PATH_SPAMD_DB);
- } else if (i != -1)
+ }
+ if (i != -1)
close(i);
/*