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
This commit is contained in:
Kristof Provost 2021-03-10 15:50:42 +01:00
parent 5e9dae8e14
commit 913e7dc3e0

View File

@ -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 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td
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 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td
free(newpa, M_PFRULE);
}
PF_RULES_WUNLOCK();
if (kif != NULL)
pf_kkif_free(kif);
pf_kkif_free(kif);
break;
}