From 369f7cc45172000badc43107b7fbad80c4cabf5d Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Fri, 11 Feb 2022 19:45:59 +0800 Subject: [PATCH] net/rpmsg: fix the NULL pointer reference on nonblock accept Signed-off-by: chao.an --- net/rpmsg/rpmsg_sockif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/rpmsg/rpmsg_sockif.c b/net/rpmsg/rpmsg_sockif.c index 542a26c588..b6bd3b9376 100644 --- a/net/rpmsg/rpmsg_sockif.c +++ b/net/rpmsg/rpmsg_sockif.c @@ -786,7 +786,7 @@ static int rpmsg_socket_accept(FAR struct socket *psock, } else { - if (_SS_ISNONBLOCK(conn->sconn.s_flags)) + if (_SS_ISNONBLOCK(server->sconn.s_flags)) { ret = -EAGAIN; break;