svn commit: r268507 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Thu Jul 10 21:05:46 UTC 2014
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;
More information about the svn-src-all
mailing list