mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
5e9dae8e14
commit
913e7dc3e0
1 changed files with 3 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue