svn commit: r347527 - head/sys/net
Andrey V. Elsukov
ae at FreeBSD.org
Mon May 13 14:07:03 UTC 2019
Author: ae
Date: Mon May 13 14:07:02 2019
New Revision: 347527
URL: https://svnweb.freebsd.org/changeset/base/347527
Log:
Do not leak memory used for binary filter.
Modified:
head/sys/net/bpf.c
Modified: head/sys/net/bpf.c
==============================================================================
--- head/sys/net/bpf.c Mon May 13 13:45:28 2019 (r347526)
+++ head/sys/net/bpf.c Mon May 13 14:07:02 2019 (r347527)
@@ -2628,11 +2628,17 @@ bpfd_free(epoch_context_t ctx)
if (d->bd_rfilter != NULL) {
p = __containerof((void *)d->bd_rfilter,
struct bpf_program_buffer, buffer);
+#ifdef BPF_JITTER
+ p->func = d->bd_bfilter;
+#endif
bpf_program_buffer_free(&p->epoch_ctx);
}
if (d->bd_wfilter != NULL) {
p = __containerof((void *)d->bd_wfilter,
struct bpf_program_buffer, buffer);
+#ifdef BPF_JITTER
+ p->func = NULL;
+#endif
bpf_program_buffer_free(&p->epoch_ctx);
}
More information about the svn-src-all
mailing list