Fix potential NULL deref.
Found by: PVS Studio
This commit is contained in:
parent
4f14ba6ca3
commit
9f5efe718f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=316804
@ -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