Date: Sat, 20 Mar 2021 09:59:39 GMT From: Kristof Provost <kp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 2001c1a0d2c0 - stable/13 - pf: Remove redundant kif != NULL checks Message-ID: <202103200959.12K9xdNn064093@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2001c1a0d2c003379c702373a9d259cb660cbff3 commit 2001c1a0d2c003379c702373a9d259cb660cbff3 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2021-03-10 14:50:42 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2021-03-19 22:39:39 +0000 pf: Remove redundant kif != NULL checks pf_kkif_free() already checks for NULL, so we don't have to check before we call it. Reviewed by: melifaro@ MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D29195 (cherry picked from commit 913e7dc3e0eb7df78ec0e7ecc7dd160a316a3ac6) --- sys/netpfil/pf/pf_ioctl.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 5f9eb771d0e0..977f0debacaa 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -2001,8 +2001,7 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td DIOCADDRULE_error: PF_RULES_WUNLOCK(); pf_krule_free(rule); - if (kif) - pf_kkif_free(kif); + pf_kkif_free(kif); break; } @@ -2300,8 +2299,7 @@ DIOCADDRULE_error: DIOCCHANGERULE_error: PF_RULES_WUNLOCK(); pf_krule_free(newrule); - if (kif != NULL) - pf_kkif_free(kif); + pf_kkif_free(kif); break; } @@ -3144,8 +3142,7 @@ DIOCCHANGEADDR_error: free(newpa, M_PFRULE); } PF_RULES_WUNLOCK(); - if (kif != NULL) - pf_kkif_free(kif); + pf_kkif_free(kif); break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103200959.12K9xdNn064093>