Skip to content

Commit c22233a

Browse files
JordanYatesdleach02
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]>
1 parent 303c7d7 commit c22233a

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)