Commit 4aa3e562 authored by Jordan Yates's avatar Jordan Yates Committed by Anas Nashif
Browse files

net: nsos_sockets: free allocated socket on close

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

Signed-off-by: default avatarJordan Yates <jordan@embeint.com>
(cherry picked from commit c22233a1)
parent 9cc6307f
Loading
Loading
Loading
Loading
+2 −0
Changes for drivers/net/nsos_sockets.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -256,6 +256,8 @@ static int nsos_close(void *obj)
		errno = nsos_adapt_get_zephyr_errno();
	}

	k_free(sock);

	return ret;
}