Don't modify a structure without holding a reference count on it.

MFC after:	3 days
This commit is contained in:
Michael Tuexen 2016-08-06 15:29:46 +00:00
parent c12dee326f
commit cf46cace5c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=303798

View File

@ -6098,9 +6098,9 @@ sctp_sorecvmsg(struct socket *so,
goto stage_left;
#endif
}
atomic_add_int(&stcb->asoc.refcnt, -1);
/* Save the value back for next time */
stcb->freed_by_sorcv_sincelast = freed_so_far;
atomic_add_int(&stcb->asoc.refcnt, -1);
}
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_RECV_RWND_LOGGING_ENABLE) {
if (stcb) {