Author: jkim
Date: Mon Apr  5 17:32:49 2010
New Revision: 206185
URL: http://svn.freebsd.org/changeset/base/206185

Log:
  MFC:  r205858
  
  Check the pointer to JIT binary filter before its de-allocation.

Modified:
  stable/8/sys/net/bpf.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/net/bpf.c
==============================================================================
--- stable/8/sys/net/bpf.c      Mon Apr  5 17:26:23 2010        (r206184)
+++ stable/8/sys/net/bpf.c      Mon Apr  5 17:32:49 2010        (r206185)
@@ -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);
 }
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to