pf: remove pointless NULL check

pfi_kkif_attach() always returns non-NULL, and we dereference the
pointer before we check it, so that's pointless.

Reported by:	Coverity (CID 1007345)
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Kristof Provost 2022-04-21 14:33:48 +02:00
parent 5727eceabc
commit ed6287c141

View file

@ -563,8 +563,7 @@ _bad:
pfr_detach_table(dyn->pfid_kt);
if (ruleset != NULL)
pf_remove_if_empty_kruleset(ruleset);
if (dyn->pfid_kif != NULL)
pfi_kkif_unref(dyn->pfid_kif);
pfi_kkif_unref(dyn->pfid_kif);
free(dyn, PFI_MTYPE);
return (rv);