svn commit: r295710 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Wed Feb 17 18:12:40 UTC 2016
Author: tuexen
Date: Wed Feb 17 18:12:38 2016
New Revision: 295710
URL: https://svnweb.freebsd.org/changeset/base/295710
Log:
Add protection code for issues reported by PVS / D5245.
MFC after: 3 days
Modified:
head/sys/netinet/sctp_input.c
Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c Wed Feb 17 18:04:22 2016 (r295709)
+++ head/sys/netinet/sctp_input.c Wed Feb 17 18:12:38 2016 (r295710)
@@ -909,7 +909,9 @@ sctp_handle_shutdown(struct sctp_shutdow
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 @@ process_control_chunks:
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);
}
More information about the svn-src-all
mailing list