Don't free read control entries, which are still on the stream queue when
adding them the the read queue fails MFC after: 1 week
This commit is contained in:
parent
40152db5d3
commit
8a3cfbff92
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=350011
@ -4567,12 +4567,14 @@ sctp_add_to_readq(struct sctp_inpcb *inp,
|
||||
if (inp_read_lock_held == 0)
|
||||
SCTP_INP_READ_LOCK(inp);
|
||||
if (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_CANT_READ) {
|
||||
sctp_free_remote_addr(control->whoFrom);
|
||||
if (control->data) {
|
||||
sctp_m_freem(control->data);
|
||||
control->data = NULL;
|
||||
if (!control->on_strm_q) {
|
||||
sctp_free_remote_addr(control->whoFrom);
|
||||
if (control->data) {
|
||||
sctp_m_freem(control->data);
|
||||
control->data = NULL;
|
||||
}
|
||||
sctp_free_a_readq(stcb, control);
|
||||
}
|
||||
sctp_free_a_readq(stcb, control);
|
||||
if (inp_read_lock_held == 0)
|
||||
SCTP_INP_READ_UNLOCK(inp);
|
||||
return;
|
||||
@ -4617,8 +4619,10 @@ sctp_add_to_readq(struct sctp_inpcb *inp,
|
||||
control->tail_mbuf = prev;
|
||||
} else {
|
||||
/* Everything got collapsed out?? */
|
||||
sctp_free_remote_addr(control->whoFrom);
|
||||
sctp_free_a_readq(stcb, control);
|
||||
if (!control->on_strm_q) {
|
||||
sctp_free_remote_addr(control->whoFrom);
|
||||
sctp_free_a_readq(stcb, control);
|
||||
}
|
||||
if (inp_read_lock_held == 0)
|
||||
SCTP_INP_READ_UNLOCK(inp);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user