mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
MFC: r205858
Check the pointer to JIT binary filter before its de-allocation.
This commit is contained in:
parent
02b5123ee3
commit
7493cc345a
1 changed files with 4 additions and 3 deletions
|
|
@ -1865,13 +1865,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 a new issue