Add protection code for issues reported by PVS / D5245.
MFC after: 3 days
This commit is contained in:
parent
815f806b82
commit
828318e155
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295710
@ -909,7 +909,9 @@ sctp_handle_shutdown(struct sctp_shutdown_chunk *cp,
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket);
|
||||
if (stcb->sctp_socket) {
|
||||
sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket);
|
||||
}
|
||||
#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING)
|
||||
SCTP_SOCKET_UNLOCK(so, 1);
|
||||
#endif
|
||||
@ -4858,7 +4860,7 @@ __attribute__((noinline))
|
||||
if ((stcb) && (stcb->asoc.total_output_queue_size)) {
|
||||
;
|
||||
} else {
|
||||
if (locked_tcb != stcb) {
|
||||
if ((locked_tcb != NULL) && (locked_tcb != stcb)) {
|
||||
/* Very unlikely */
|
||||
SCTP_TCB_UNLOCK(locked_tcb);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user