Revert "net/inet: Fix a memory leak when closing a TCP socket."

This reverts commit 63a8d79553443e9048f31d53d4111f93d819ff75.
This commit is contained in:
Gregory Nutt 2017-11-04 07:16:22 -06:00
parent 73c4bac7a6
commit 5696e57bc9

View File

@ -348,11 +348,7 @@ static inline int tcp_close_disconnect(FAR struct socket *psock)
* release it now. * release it now.
*/ */
if (psock->s_sndcb != NULL) psock->s_sndcb = NULL;
{
tcp_callback_free(conn, psock->s_sndcb);
psock->s_sndcb = NULL;
}
#endif #endif
/* Check for the case where the host beat us and disconnected first */ /* Check for the case where the host beat us and disconnected first */