mirror of
https://github.com/apache/nuttx.git
synced 2026-05-22 05:42:05 +08:00
TCP: check for sndcb before using it
This commit is contained in:
committed by
Gregory Nutt
parent
df211ee46a
commit
cdd187a7f3
@@ -181,8 +181,11 @@ static inline void psock_lost_connection(FAR struct socket *psock,
|
||||
|
||||
/* Do not allow any further callbacks */
|
||||
|
||||
psock->s_sndcb->flags = 0;
|
||||
psock->s_sndcb->event = NULL;
|
||||
if (psock->s_sndcb != NULL)
|
||||
{
|
||||
psock->s_sndcb->flags = 0;
|
||||
psock->s_sndcb->event = NULL;
|
||||
}
|
||||
|
||||
/* Free all queued write buffers */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user