Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Apr 2012 19:30:22 +0000 (UTC)
From:      Kirk McKusick <mckusick@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r234441 - head/sys/kern
Message-ID:  <201204181930.q3IJUMs4047414@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mckusick
Date: Wed Apr 18 19:30:22 2012
New Revision: 234441
URL: http://svn.freebsd.org/changeset/base/234441

Log:
  Fix a memory leak of M_VNODE_MARKER introduced in 234386.
  
  Found by:  Peter Holm

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Wed Apr 18 19:25:37 2012	(r234440)
+++ head/sys/kern/vfs_subr.c	Wed Apr 18 19:30:22 2012	(r234441)
@@ -4528,10 +4528,10 @@ __mnt_vnode_first_all(struct vnode **mvp
 
 	/* Check if we are done */
 	if (vp == NULL) {
-		*mvp = NULL;
 		MNT_REL(mp);
 		MNT_IUNLOCK(mp);
 		free(*mvp, M_VNODE_MARKER);
+		*mvp = NULL;
 		return (NULL);
 	}
 	(*mvp)->v_mount = mp;



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