Use correct order of conditions to avoid NULL deref.

MFC after:	3 days
X-MFC with:	r302935
This commit is contained in:
Michael Tuexen 2016-07-19 11:16:44 +00:00
parent 0ba4c8abe0
commit 0fa7377a03
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=303025

View File

@ -831,7 +831,7 @@ sctp_handle_old_data(struct sctp_tcb *stcb, struct sctp_association *asoc, struc
SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED);
}
sctp_wakeup_the_read_socket(stcb->sctp_ep, stcb, SCTP_SO_NOT_LOCKED);
if (!TAILQ_EMPTY(&nc->reasm) && (nc->first_frag_seen)) {
if ((nc->first_frag_seen) && !TAILQ_EMPTY(&nc->reasm)) {
/*
* Switch to the new guy and
* continue