Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jul 2014 21:05:46 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r268507 - head/sys/kern
Message-ID:  <201407102105.s6AL5kOJ013752@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Thu Jul 10 21:05:45 2014
New Revision: 268507
URL: http://svnweb.freebsd.org/changeset/base/268507

Log:
  Don't zero fd_nfiles during fdp destruction.
  
  Code trying to take a look has to check fd_refcnt and it is 0 by that time.
  
  This is a follow up to r268505, without this the code would leak memory for
  tables bigger than the default.
  
  MFC after:	1 week

Modified:
  head/sys/kern/kern_descrip.c

Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c	Thu Jul 10 21:02:58 2014	(r268506)
+++ head/sys/kern/kern_descrip.c	Thu Jul 10 21:05:45 2014	(r268507)
@@ -2034,8 +2034,6 @@ fdescfree(struct thread *td)
 		return;
 	}
 
-	fdp->fd_nfiles = 0;
-
 	cdir = fdp->fd_cdir;
 	fdp->fd_cdir = NULL;
 	rdir = fdp->fd_rdir;



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