Fix a crash when using one-to-one stlye socket in non-blocking

mode and there is no listening server.
PR: 137795
Approved by: re, rrs (mentor)
MFC after:immediately.
This commit is contained in:
Michael Tuexen 2009-08-18 19:58:49 +00:00
parent e477e4fe8e
commit 627dfd6df9

View File

@ -12464,7 +12464,8 @@ sctp_lower_sosend(struct socket *so,
error = ENOTCONN;
goto out_unlocked;
}
hold_tcblock = 0;
SCTP_TCB_LOCK(stcb);
hold_tcblock = 1;
SCTP_INP_RUNLOCK(inp);
if (addr) {
/* Must locate the net structure if addr given */