summaryrefslogtreecommitdiffstats
path: root/usr.sbin/authpf
diff options
context:
space:
mode:
authormmcc <mmcc@openbsd.org>2015-12-08 07:11:53 +0000
committermmcc <mmcc@openbsd.org>2015-12-08 07:11:53 +0000
commit402e12b7671f957f080fe656824889d48a8740f3 (patch)
tree1b5f9a37eb56b85fcb5eae65513be5f369a0fd86 /usr.sbin/authpf
parentEd was meant to be El; (diff)
downloadwireguard-openbsd-402e12b7671f957f080fe656824889d48a8740f3.tar.xz
wireguard-openbsd-402e12b7671f957f080fe656824889d48a8740f3.zip
Remove a NULL-check before free().
Diffstat (limited to 'usr.sbin/authpf')
-rw-r--r--usr.sbin/authpf/authpf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.sbin/authpf/authpf.c b/usr.sbin/authpf/authpf.c
index ec09f31a23e..44054a80b4b 100644
--- a/usr.sbin/authpf/authpf.c
+++ b/usr.sbin/authpf/authpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: authpf.c,v 1.123 2015/01/21 21:50:32 deraadt Exp $ */
+/* $OpenBSD: authpf.c,v 1.124 2015/12/08 07:11:53 mmcc Exp $ */
/*
* Copyright (C) 1998 - 2007 Bob Beck (beck@openbsd.org).
@@ -546,10 +546,8 @@ allowed_luser(struct passwd *pw)
strcmp("*", buf) == 0;
}
- if (lbuf != NULL) {
- free(lbuf);
- lbuf = NULL;
- }
+ free(lbuf);
+ lbuf = NULL;
if (matched) {
fclose(f);