提交 3e632cf7 编写于 作者: S Shengliang Guan

fix crash while close vnodes

上级 71081b5b
...@@ -283,7 +283,7 @@ static void *dnodeOpenVnode(void *param) { ...@@ -283,7 +283,7 @@ static void *dnodeOpenVnode(void *param) {
static int32_t dnodeOpenVnodes() { static int32_t dnodeOpenVnodes() {
int32_t *vnodeList = calloc(TSDB_MAX_VNODES, sizeof(int32_t)); int32_t *vnodeList = calloc(TSDB_MAX_VNODES, sizeof(int32_t));
int32_t numOfVnodes; int32_t numOfVnodes = 0;
int32_t status = dnodeGetVnodeList(vnodeList, &numOfVnodes); int32_t status = dnodeGetVnodeList(vnodeList, &numOfVnodes);
if (status != TSDB_CODE_SUCCESS) { if (status != TSDB_CODE_SUCCESS) {
...@@ -360,7 +360,7 @@ void dnodeStartStream() { ...@@ -360,7 +360,7 @@ void dnodeStartStream() {
static void dnodeCloseVnodes() { static void dnodeCloseVnodes() {
int32_t vnodeList[TSDB_MAX_VNODES]; int32_t vnodeList[TSDB_MAX_VNODES];
int32_t numOfVnodes; int32_t numOfVnodes = 0;
int32_t status; int32_t status;
status = vnodeGetVnodeList(vnodeList, &numOfVnodes); status = vnodeGetVnodeList(vnodeList, &numOfVnodes);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册