Check the pointer to JIT binary filter before its de-allocation.
Submitted by: Alexander Sack (asack at niksun dot com) MFC after: 3 days
This commit is contained in:
parent
f46f4ae113
commit
704858479c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=205858
@ -1867,13 +1867,14 @@ bpf_freed(struct bpf_d *d)
|
||||
* free.
|
||||
*/
|
||||
bpf_free(d);
|
||||
if (d->bd_rfilter) {
|
||||
if (d->bd_rfilter != NULL) {
|
||||
free((caddr_t)d->bd_rfilter, M_BPF);
|
||||
#ifdef BPF_JITTER
|
||||
bpf_destroy_jit_filter(d->bd_bfilter);
|
||||
if (d->bd_bfilter != NULL)
|
||||
bpf_destroy_jit_filter(d->bd_bfilter);
|
||||
#endif
|
||||
}
|
||||
if (d->bd_wfilter)
|
||||
if (d->bd_wfilter != NULL)
|
||||
free((caddr_t)d->bd_wfilter, M_BPF);
|
||||
mtx_destroy(&d->bd_mtx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user