Commit 913e7dc3 authored by Kristof Provost's avatar Kristof Provost
Browse files

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
parent 5e9dae8e
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment