Date: Fri, 30 Sep 2022 20:45:03 GMT From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 636420bde362 - main - unix/dgram: don't leak file descriptors when socket write failed Message-ID: <202209302045.28UKj3iw093493@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=636420bde36282c4d9c8855e56fdc3601e192129 commit 636420bde36282c4d9c8855e56fdc3601e192129 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2022-09-30 20:26:14 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2022-09-30 20:43:08 +0000 unix/dgram: don't leak file descriptors when socket write failed --- sys/kern/uipc_usrreq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 00d7aa1fc968..0c6d41ddca10 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1338,6 +1338,8 @@ uipc_sosend_dgram(struct socket *so, struct sockaddr *addr, struct uio *uio, } else { soroverflow_locked(so2); error = (so->so_state & SS_NBIO) ? EAGAIN : ENOBUFS; + if (f->m_next->m_type == MT_CONTROL) + unp_scan(f->m_next, unp_freerights); } if (addr != NULL)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202209302045.28UKj3iw093493>