commit | 7e58c5609a87d686dd7429963d6699a801e845de | [log] [tgz] |
---|---|---|
author | Aska Wu <aska.wu@linaro.org> | Fri Nov 17 17:16:10 2017 +0800 |
committer | Jukka Rissanen <jukka.rissanen@linux.intel.com> | Fri Nov 17 12:58:32 2017 +0200 |
tree | d2d838b59e4daa49475abc19b60146019d567baa | |
parent | 486e15682769403e565ee20393e5713e037de598 [diff] |
net: sockets: Fix net pkt leak If net_context_recv() returns a error, net pkt will not be released. For example, net_context_recv() returns -EBADF because the TCP connection is closed by the peer. Handle the return value instead of using SET_ERRNO(). Signed-off-by: Aska Wu <aska.wu@linaro.org>