Skip to content

Commit 4aa3e56

Browse files
JordanYatesnashif
authored andcommitted
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 <[email protected]> (cherry picked from commit c22233a)
1 parent 9cc6307 commit 4aa3e56

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/nsos_sockets.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ static int nsos_close(void *obj)
256256
errno = nsos_adapt_get_zephyr_errno();
257257
}
258258

259+
k_free(sock);
260+
259261
return ret;
260262
}
261263

0 commit comments

Comments
 (0)