From owner-svn-src-all@FreeBSD.ORG Mon Apr 5 17:33:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3A7E106566C; Mon, 5 Apr 2010 17:33:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A16F48FC16; Mon, 5 Apr 2010 17:33:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o35HXXeE095860; Mon, 5 Apr 2010 17:33:33 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o35HXXaH095858; Mon, 5 Apr 2010 17:33:33 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201004051733.o35HXXaH095858@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 5 Apr 2010 17:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206186 - stable/7/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2010 17:33:33 -0000 Author: jkim Date: Mon Apr 5 17:33:33 2010 New Revision: 206186 URL: http://svn.freebsd.org/changeset/base/206186 Log: MFC: r205858 Check the pointer to JIT binary filter before its de-allocation. Modified: stable/7/sys/net/bpf.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/net/bpf.c ============================================================================== --- stable/7/sys/net/bpf.c Mon Apr 5 17:32:49 2010 (r206185) +++ stable/7/sys/net/bpf.c Mon Apr 5 17:33:33 2010 (r206186) @@ -1586,13 +1586,14 @@ bpf_freed(struct bpf_d *d) if (d->bd_fbuf != NULL) free(d->bd_fbuf, M_BPF); } - 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); }