net: tcp2: Properly cleanup receive queue

When pushing received data to the application, check that app
was able to receive the data. If the application already closed
the socket, then we must free the received net_pkt in order to
avoid memory leak.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
1 file changed