summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQiuwen Lu <[email protected]>2017-10-11 18:47:27 +0800
committerQiuwen Lu <[email protected]>2017-10-11 18:47:27 +0800
commitc9283dbd5e884edb6c22ba6c0140f5be98422de2 (patch)
treeb914b597d92ee1d5fdc4da8d766d2e5ed44acdb2
parent2a5658a37cf1f64b826fc91306853a251082984d (diff)
修正路由型sendpath创建过程中,部分内存没有初始化,导致通过函数指针调用虚函数时段错误的Bug。v4.2.26-20171011
-rw-r--r--app/src/sendpath.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/src/sendpath.c b/app/src/sendpath.c
index 5cc1d6d..8d1fc01 100644
--- a/app/src/sendpath.c
+++ b/app/src/sendpath.c
@@ -289,6 +289,8 @@ _build:
}
struct __mr_sendpath_route * _sendpath = malloc(sizeof(struct __mr_sendpath_route));
+ memset(_sendpath, 0, sizeof(struct __mr_sendpath_route));
+
struct mr_sendpath * sendpath = &_sendpath->_father;
/* 填充SendPath各虚函数指针*/