summaryrefslogtreecommitdiffstats
path: root/usr.sbin/authpf
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2006-03-17 22:00:27 +0000
committerderaadt <deraadt@openbsd.org>2006-03-17 22:00:27 +0000
commit59e75d462ad987053279359cdbbe66cc4dc62db1 (patch)
treecaf7ab2dbf4a14ae15c6c36ea9ac896f21babf23 /usr.sbin/authpf
parentsize_t size() (diff)
downloadwireguard-openbsd-59e75d462ad987053279359cdbbe66cc4dc62db1.tar.xz
wireguard-openbsd-59e75d462ad987053279359cdbbe66cc4dc62db1.zip
FILE * leak
Diffstat (limited to 'usr.sbin/authpf')
-rw-r--r--usr.sbin/authpf/authpf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/authpf/authpf.c b/usr.sbin/authpf/authpf.c
index 94ca33abccb..1c648860cc8 100644
--- a/usr.sbin/authpf/authpf.c
+++ b/usr.sbin/authpf/authpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authpf.c,v 1.97 2006/03/14 21:45:14 beck Exp $ */
+/* $OpenBSD: authpf.c,v 1.98 2006/03/17 22:00:27 deraadt Exp $ */
/*
* Copyright (C) 1998 - 2002 Bob Beck (beck@openbsd.org).
@@ -556,9 +556,11 @@ check_luser(char *luserdir, char *luser)
while (fputs(tmp, stdout) != EOF && !feof(f)) {
if (fgets(tmp, sizeof(tmp), f) == NULL) {
fflush(stdout);
+ fclose(f);
return (0);
}
}
+ fclose(f);
}
fflush(stdout);
return (0);