fix: invalid read while retrieve mnodes
This commit is contained in:
parent
3b69118ee7
commit
7a743e11c3
|
@ -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++);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue