gazelle/0069-fix-coredump-because-of-addr-null-in-lwip_fill_sendr.patch
yinbin 79980c367d sync upstream patch
(cherry picked from commit 377d2a41acacfae6d887d58dc7c63224bfdee54b)
2023-12-11 09:57:00 +08:00

26 lines
924 B
Diff

From 7ad97d182db49ae91e9044f4d50e52f8633b2b1c Mon Sep 17 00:00:00 2001
From: yinbin <yinbin8@huawei.com>
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