Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
samples: net: socket: packet: Fix memory leak
The conn_raw_input() in connection.c will clone the incoming packet so that it is possible to receive socket data in multiple packet sockets. This is all fine except that if the socket is never calling recv(), then the cloned net_pkt is never processed and we will have a memory leak. What this all means in practice, is that we should call recv() for every packet socket in order to flush the socket for any incoming data even if the socket is just sending data. Fixes #34462 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
- Loading branch information