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:
parent
303c7d7e69
commit
c22233a1af
|
@ -256,6 +256,8 @@ static int nsos_close(void *obj)
|
|||
errno = nsos_adapt_get_zephyr_errno();
|
||||
}
|
||||
|
||||
k_free(sock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue