pf: Handle errors returned by pf_killstates()

Happily this wasn't a real bug, because pf_killstates() never fails, but
we should check the return value anyway, in case it does ever start
returning errors.

Reported by:	clang --analyze
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Kristof Provost 2021-07-05 14:21:03 +02:00
parent 8cceacc0f1
commit fa96701c8a

View file

@ -4887,6 +4887,8 @@ pf_killstates_nv(struct pfioc_nv *nv)
ERROUT(error);
error = pf_killstates(&kill, &killed);
if (error)
ERROUT(error);
free(nvlpacked, M_NVLIST);
nvlpacked = NULL;