From owner-cvs-all Sat Mar 10 8:31: 8 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 968CE37B719; Sat, 10 Mar 2001 08:31:01 -0800 (PST) (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f2AGV1E35617; Sat, 10 Mar 2001 08:31:01 -0800 (PST) (envelope-from julian) Message-Id: <200103101631.f2AGV1E35617@freefall.freebsd.org> From: Julian Elischer Date: Sat, 10 Mar 2001 08:31:01 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/netgraph netgraph.h ng_base.c ng_pptpgre.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG julian 2001/03/10 08:31:01 PST Modified files: sys/netgraph netgraph.h ng_base.c ng_pptpgre.c Log: netgraph.h: Change a prototype. Add a function version of ng_ref_node() when debugging so a breakpoint can be set on it. ng_base.c: add 'node' as an argument to ng_apply_item so that it is up to the caller to take over and release the item's reference on the node. If the release reports back that the node went away due to the reference going to 0, the caller should cease referencing the now defunct node. (e.g. the item was a 'kill node' message). Alter ng_unref_node to report back the residual references as a result. ng_pptpgre.c: Don't reference a node after we dropped a reference to it. (What if it was the last?) Fixes a node leak reported by Harti Brandt which was due to an incorrect earlier attempt to fix the "accessing node after dropping the last reference" problem. Revision Changes Path 1.30 +8 -6 src/sys/netgraph/netgraph.h 1.54 +57 -19 src/sys/netgraph/ng_base.c 1.20 +3 -2 src/sys/netgraph/ng_pptpgre.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message