Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 May 2011 12:11:30 +0000 (UTC)
From:      Marko Zec <zec@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r221985 - stable/8/sys/netgraph
Message-ID:  <201105161211.p4GCBU4j081642@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: zec
Date: Mon May 16 12:11:29 2011
New Revision: 221985
URL: http://svn.freebsd.org/changeset/base/221985

Log:
  MFC r220416:
  
    Properly unref ng_hub nodes on shutdown, so that we don't leak them.

Modified:
  stable/8/sys/netgraph/ng_hub.c
Directory Properties:
  stable/8/sys/   (props changed)

Modified: stable/8/sys/netgraph/ng_hub.c
==============================================================================
--- stable/8/sys/netgraph/ng_hub.c	Mon May 16 12:00:32 2011	(r221984)
+++ stable/8/sys/netgraph/ng_hub.c	Mon May 16 12:11:29 2011	(r221985)
@@ -157,6 +157,8 @@ ng_hub_shutdown(node_p node)
 	const priv_p priv = NG_NODE_PRIVATE(node);
 
 	free(priv, M_NETGRAPH_HUB);
+	NG_NODE_SET_PRIVATE(node, NULL);
+	NG_NODE_UNREF(node);
 	return (0);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105161211.p4GCBU4j081642>