From 7ad97d182db49ae91e9044f4d50e52f8633b2b1c Mon Sep 17 00:00:00 2001 From: yinbin Date: Fri, 1 Dec 2023 15:58:09 +0800 Subject: [PATCH] fix coredump because of addr null in lwip_fill_sendring --- src/lstack/core/lstack_protocol_stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lstack/core/lstack_protocol_stack.c b/src/lstack/core/lstack_protocol_stack.c index c087098..27eeafb 100644 --- a/src/lstack/core/lstack_protocol_stack.c +++ b/src/lstack/core/lstack_protocol_stack.c @@ -699,7 +699,7 @@ void stack_close(struct rpc_msg *msg) struct protocol_stack *stack = get_protocol_stack_by_fd(fd); struct lwip_sock *sock = get_socket(fd); - if (NETCONN_IS_DATAOUT(sock)) { + if (sock && NETCONN_IS_DATAOUT(sock)) { msg->recall_flag = 1; rpc_call(&stack->rpc_queue, msg); /* until stack_send recall finish */ return; -- 2.27.0