Fix a NULL pointer dereference panic that occurs when the TCP protocol