Fix potential NULL deref.
Found by: PVS Studio
This commit is contained in:
parent
eceeea64cb
commit
3bd2cbf9a3
@ -2428,11 +2428,12 @@ pfioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct thread *td
|
||||
|
||||
#undef ERROUT
|
||||
DIOCCHANGEADDR_error:
|
||||
if (newpa->kif)
|
||||
pfi_kif_unref(newpa->kif);
|
||||
PF_RULES_WUNLOCK();
|
||||
if (newpa != NULL)
|
||||
if (newpa != NULL) {
|
||||
if (newpa->kif)
|
||||
pfi_kif_unref(newpa->kif);
|
||||
free(newpa, M_PFRULE);
|
||||
}
|
||||
PF_RULES_WUNLOCK();
|
||||
if (kif != NULL)
|
||||
free(kif, PFI_MTYPE);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user