svn commit: r262259 - stable/10/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Thu Feb 20 21:36:05 UTC 2014
Author: mjg
Date: Thu Feb 20 21:36:05 2014
New Revision: 262259
URL: http://svnweb.freebsd.org/changeset/base/262259
Log:
MFC r260233:
Plug a memory leak in dup2 when both old and new fd have ioctl caps.
Modified:
stable/10/sys/kern/kern_descrip.c
Modified: stable/10/sys/kern/kern_descrip.c
==============================================================================
--- stable/10/sys/kern/kern_descrip.c Thu Feb 20 21:32:24 2014 (r262258)
+++ stable/10/sys/kern/kern_descrip.c Thu Feb 20 21:36:05 2014 (r262259)
@@ -879,6 +879,7 @@ do_dup(struct thread *td, int flags, int
/*
* Duplicate the source descriptor.
*/
+ filecaps_free(&newfde->fde_caps);
*newfde = *oldfde;
filecaps_copy(&oldfde->fde_caps, &newfde->fde_caps);
if ((flags & DUP_CLOEXEC) != 0)
More information about the svn-src-stable
mailing list