From owner-svn-src-all@FreeBSD.ORG Thu Apr 7 13:54:43 2011 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 0EBD3106566C; Thu, 7 Apr 2011 13:54:43 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 8E8B58FC08; Thu, 7 Apr 2011 13:54:42 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.4/8.14.4) with ESMTP id p37DseRI026904; Thu, 7 Apr 2011 17:54:40 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.4/8.14.4/Submit) id p37Dseth026903; Thu, 7 Apr 2011 17:54:40 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 7 Apr 2011 17:54:40 +0400 From: Gleb Smirnoff To: Marko Zec Message-ID: <20110407135440.GX84445@FreeBSD.org> References: <201104071140.p37BeAlE039248@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201104071140.p37BeAlE039248@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r220416 - head/sys/netgraph 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: Thu, 07 Apr 2011 13:54:43 -0000 On Thu, Apr 07, 2011 at 11:40:10AM +0000, Marko Zec wrote: M> Author: zec M> Date: Thu Apr 7 11:40:10 2011 M> New Revision: 220416 M> URL: http://svn.freebsd.org/changeset/base/220416 M> M> Log: M> Properly unref ng_hub nodes on shutdown, so that we don't leak them. M> M> MFC after: 3 days M> M> Modified: M> head/sys/netgraph/ng_hub.c M> M> Modified: head/sys/netgraph/ng_hub.c M> ============================================================================== M> --- head/sys/netgraph/ng_hub.c Thu Apr 7 11:13:50 2011 (r220415) M> +++ head/sys/netgraph/ng_hub.c Thu Apr 7 11:40:10 2011 (r220416) M> @@ -157,6 +157,8 @@ ng_hub_shutdown(node_p node) M> const priv_p priv = NG_NODE_PRIVATE(node); M> M> free(priv, M_NETGRAPH_HUB); M> + NG_NODE_SET_PRIVATE(node, NULL); M> + NG_NODE_UNREF(node); M> return (0); M> } Do we really need NG_NODE_SET_PRIVATE()? -- Totus tuus, Glebius.