summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Nedvedicky <sashan@cvs.openbsd.org>2021-12-06 07:41:34 +0000
committerAlexandr Nedvedicky <sashan@cvs.openbsd.org>2021-12-06 07:41:34 +0000
commitb8e4b85b4e3171f13bcc9726a9cbc726a5b783fb (patch)
tree66b073f821fce855c59c56689861d4147d0365b8
parentd6a912158f4907999028bfde0c761374344707ce (diff)
fix odd check in pfi_kif_free()
pointed out by jsg@ OK jsg@
-rw-r--r--sys/net/pf_if.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/net/pf_if.c b/sys/net/pf_if.c
index 8de37375ab4..6a83e86583e 100644
--- a/sys/net/pf_if.c
+++ b/sys/net/pf_if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_if.c,v 1.101 2021/11/11 12:35:01 sashan Exp $ */
+/* $OpenBSD: pf_if.c,v 1.102 2021/12/06 07:41:33 sashan Exp $ */
/*
* Copyright 2005 Henning Brauer <henning@openbsd.org>
@@ -107,9 +107,8 @@ pfi_kif_free(struct pfi_kif *kif)
if (kif == NULL)
return;
- if ((kif->pfik_rules != 0) || (kif->pfik_states != 0) ||
- (kif->pfik_states != 0) || (kif->pfik_states != 0) ||
- (kif->pfik_srcnodes != 0))
+ if (kif->pfik_rules || kif->pfik_states || kif->pfik_routes ||
+ kif->pfik_srcnodes)
panic("kif is still alive");
free(kif, PFI_MTYPE, sizeof(*kif));