From owner-svn-src-projects@freebsd.org Fri Jan 22 19:43:27 2016 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5143A8EADF for ; Fri, 22 Jan 2016 19:43:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2CE019AE; Fri, 22 Jan 2016 19:43:27 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0MJhQQX099654; Fri, 22 Jan 2016 19:43:26 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0MJhQ87099653; Fri, 22 Jan 2016 19:43:26 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201601221943.u0MJhQ87099653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 22 Jan 2016 19:43:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r294592 - projects/vnet/sys/netinet X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2016 19:43:27 -0000 Author: bz Date: Fri Jan 22 19:43:26 2016 New Revision: 294592 URL: https://svnweb.freebsd.org/changeset/base/294592 Log: Fix build and avoid a double-free in the VIMAGE case. Sponsored by: The FreeBSD Foundation Modified: projects/vnet/sys/netinet/ip_divert.c Modified: projects/vnet/sys/netinet/ip_divert.c ============================================================================== --- projects/vnet/sys/netinet/ip_divert.c Fri Jan 22 19:06:43 2016 (r294591) +++ projects/vnet/sys/netinet/ip_divert.c Fri Jan 22 19:43:26 2016 (r294592) @@ -811,7 +811,9 @@ div_modevent(module_t mod, int type, voi ip_divert_ptr = NULL; err = pf_proto_unregister(PF_INET, IPPROTO_DIVERT, SOCK_RAW); INP_INFO_WUNLOCK(&V_divcbinfo); - div_destroy(); +#ifndef VIMAGE + div_destroy(NULL); +#endif EVENTHANDLER_DEREGISTER(maxsockets_change, ip_divert_event_tag); break; default: