Subject: Re: kern/32842: SCM_RIGHTS can leak file descriptor resources
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Christian Biere <christianbiere@gmx.de>
List: netbsd-bugs
Date: 02/15/2006 08:45:02
The following reply was made to PR kern/32842; it has been noted by GNATS.
From: Christian Biere <christianbiere@gmx.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/32842: SCM_RIGHTS can leak file descriptor resources
Date: Wed, 15 Feb 2006 09:42:57 +0100
gnats-admin@netbsd.org wrote:
> >Category: kern
> >Responsible: kern-bug-people
> >Synopsis: SCM_RIGHTS can leak file descriptor resources
> >Arrival-Date: Wed Feb 15 08:20:00 +0000 2006
I haven't compiled this at all but I think this may fix this
problem:
Index: uipc_syscalls.c
===================================================================
RCS file: /cvsroot/src/sys/kern/uipc_syscalls.c,v
retrieving revision 1.96
diff -u -p -r1.96 uipc_syscalls.c
--- uipc_syscalls.c 26 Dec 2005 18:45:27 -0000 1.96
+++ uipc_syscalls.c 15 Feb 2006 08:37:43 -0000
@@ -555,6 +555,8 @@ sendit(struct lwp *l, int s, struct msgh
bad:
if (to)
m_freem(to);
+ if (control)
+ m_freem(control);
out:
FILE_UNUSE(fp, l);
return (error);
--
Christian