unix/dgram: don't leak file descriptors when socket write failed
This commit is contained in:
parent
1d5ebad06c
commit
636420bde3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user