fix: invalid free while create stb
This commit is contained in:
parent
6e5a6e701c
commit
6c2a8a51e6
|
@ -270,13 +270,12 @@ static int32_t mndStbActionInsert(SSdb *pSdb, SStbObj *pStb) {
|
|||
|
||||
static int32_t mndStbActionDelete(SSdb *pSdb, SStbObj *pStb) {
|
||||
mTrace("stb:%s, perform delete action, row:%p", pStb->name, pStb);
|
||||
taosArrayDestroy(pStb->pFuncs);
|
||||
taosMemoryFreeClear(pStb->pColumns);
|
||||
taosMemoryFreeClear(pStb->pTags);
|
||||
taosMemoryFreeClear(pStb->comment);
|
||||
taosMemoryFreeClear(pStb->pFuncs);
|
||||
taosMemoryFreeClear(pStb->pAst1);
|
||||
taosMemoryFreeClear(pStb->pAst2);
|
||||
taosArrayDestroy(pStb->pFuncs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -798,6 +797,7 @@ static int32_t mndCreateStb(SMnode *pMnode, SRpcMsg *pReq, SMCreateStbReq *pCrea
|
|||
|
||||
_OVER:
|
||||
mndTransDrop(pTrans);
|
||||
mndStbActionDelete(pMnode->pSdb, &stbObj);
|
||||
return code;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ endi
|
|||
|
||||
print =============== step2: create db
|
||||
sql create database db vgroups 1
|
||||
sql use db
|
||||
sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 double) tags (t1 int unsigned)
|
||||
|
||||
_OVER:
|
||||
system sh/exec.sh -n dnode1 -s stop -x SIGINT
|
||||
|
|
Loading…
Reference in New Issue