mirror of
https://github.com/Dasharo/zephyr.git
synced 2026-03-06 14:57:20 -08:00
net: sockets: zsock_close: Be sure to free file descriptor
File descriptor I freed automagically when using POSIX subsystem's close() function, but any subsys-adhoc functions like zsock_close() should do that explicitly. Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
committed by
Carles Cufí
parent
aa5bbd5dfe
commit
2e21a95fd4
@@ -139,6 +139,8 @@ int _impl_zsock_close(int sock)
|
||||
return -1;
|
||||
}
|
||||
|
||||
z_free_fd(sock);
|
||||
|
||||
return zsock_close_ctx(ctx);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user