git: f966ef3a6770 - main - pf: fold if (s != NULL) and if (s) into one block

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Wed, 04 Dec 2024 13:22:35 UTC
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=f966ef3a677014bacec024ef3f75e185ff60c93a

commit f966ef3a677014bacec024ef3f75e185ff60c93a
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2024-12-04 09:37:27 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2024-12-04 13:22:21 +0000

    pf: fold if (s != NULL) and if (s) into one block
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netpfil/pf/pf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index f587fa3fb196..8d9d595dc1ec 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -8033,10 +8033,9 @@ pf_route6(struct mbuf **m, struct pf_krule *r, struct ifnet *oifp,
 			s->kif = kif;
 			s->orig_kif = oifp->if_pf_kif;
 		}
-	}
 
-	if (s)
 		PF_STATE_UNLOCK(s);
+	}
 
 	if (ifp == NULL) {
 		SDT_PROBE1(pf, ip6, route_to, drop, __LINE__);