Don't deref a NULL pointer.
@@ -5480,10 +5480,13 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length,
ret_buf = NULL;
}
if (stcb == locked_tcb) {
+ if (stcb != NULL)
stcb->info |= 0x00000010;
} else if (locked_tcb == NULL) {
+ if (stcb != NULL)
stcb->info |= 0x00000020;
} else {
+ if (stcb != NULL)
stcb->info |= 0x00000040;
}
if (linp) {
@@ -5496,6 +5499,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length,
SCTPDBG(SCTP_DEBUG_INPUT3,
"GAK, null buffer\n");
*offset = length;
+ if (stcb != NULL)
stcb->info |= 0x00000100;
return (NULL);
}
@@ -5884,6 +5888,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length,
SCTP_TCB_UNLOCK(locked_tcb);
}
*offset = length;
+ if (stcb != NULL)
stcb->info |= 0x00000200;
return (NULL);
}
@@ -5892,12 +5897,16 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length,
if (asconf_cnt > 0 && stcb != NULL) {
sctp_send_asconf_ack(stcb);
}
+ if (stcb != NULL)
stcb->info |= 0x00000400;
if (stcb == locked_tcb) {
+ if (stcb != NULL)
stcb->info |= 0x00001000;
} else if (locked_tcb != NULL) {
+ if (stcb != NULL)
stcb->info |= 0x00002000;
} else {
+ if (stcb != NULL)
stcb->info |= 0x00004000;
}
return (stcb);
