This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit aedf6f96e144aaacaec1d170aa4782499b58ce8a
Author: Yongrong Wang <[email protected]>
AuthorDate: Wed Nov 12 20:44:28 2025 +0800

    vsock_sockif: fix circbuf_resize parameter passing error
    
    Resize the new connection's rx buffer instead of the listening socket's.
    
    Signed-off-by: Yongrong Wang <[email protected]>
---
 net/vsock/vsock_sockif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/vsock/vsock_sockif.c b/net/vsock/vsock_sockif.c
index fdf39a78d45..82331b94646 100644
--- a/net/vsock/vsock_sockif.c
+++ b/net/vsock/vsock_sockif.c
@@ -1228,7 +1228,7 @@ static int vsock_recv_listening(FAR struct vsock_conn_s 
*conn,
   vsock_addr_init(&newconn->local_addr, hdr->dst_cid, hdr->dst_port);
   vsock_addr_init(&newconn->remote_addr, hdr->src_cid, hdr->src_port);
   newconn->transport = t;
-  ret = circbuf_resize(&conn->rx_buf, conn->rx_buf_alloc);
+  ret = circbuf_resize(&newconn->rx_buf, newconn->rx_buf_alloc);
   if (ret < 0)
     {
       vsock_free(newconn);

Reply via email to