fix: invalid read while retrieve mnodes

This commit is contained in:
Shengliang Guan 2022-04-29 14:50:24 +08:00
parent 3b69118ee7
commit 7a743e11c3
2 changed files with 1 additions and 4 deletions

View File

@ -625,7 +625,7 @@ static int32_t mndRetrieveMnodes(SNodeMsg *pReq, SShowObj *pShow, SSDataBlock *p
colDataAppend(pColInfo, numOfRows, b1, false);
const char *roles = syncStr(pObj->role);
char *b2 = taosMemoryCalloc(1, strlen(roles) + VARSTR_HEADER_SIZE);
char *b2 = taosMemoryCalloc(1, strlen(roles) + 1 + VARSTR_HEADER_SIZE);
STR_WITH_MAXSIZE_TO_VARSTR(b2, roles, pShow->pMeta->pSchemas[cols].bytes);
pColInfo = taosArrayGet(pBlock->pDataBlock, cols++);

View File

@ -3,9 +3,6 @@ system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
# after mnode support, del sleep 2000, and check dnode status
sleep 2000
sql connect
#$loop_cnt = 0