TCP: check for sndcb before using it
This commit is contained in:
parent
df211ee46a
commit
cdd187a7f3
@ -181,8 +181,11 @@ static inline void psock_lost_connection(FAR struct socket *psock,
|
|||||||
|
|
||||||
/* Do not allow any further callbacks */
|
/* Do not allow any further callbacks */
|
||||||
|
|
||||||
|
if (psock->s_sndcb != NULL)
|
||||||
|
{
|
||||||
psock->s_sndcb->flags = 0;
|
psock->s_sndcb->flags = 0;
|
||||||
psock->s_sndcb->event = NULL;
|
psock->s_sndcb->event = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Free all queued write buffers */
|
/* Free all queued write buffers */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user