net: nsos_sockets: free allocated socket on close

Free the socket object allocated in `nsos_socket_create` when closing
the socket.

Signed-off-by: Jordan Yates <jordan@embeint.com>
This commit is contained in:
Jordan Yates 2024-10-26 15:50:14 +10:00 committed by David Leach
parent 303c7d7e69
commit c22233a1af
1 changed files with 2 additions and 0 deletions

View File

@ -256,6 +256,8 @@ static int nsos_close(void *obj)
errno = nsos_adapt_get_zephyr_errno();
}
k_free(sock);
return ret;
}