[td-11818] fix invalid free.
This commit is contained in:
parent
57693bf436
commit
bd386044a1
|
@ -181,7 +181,7 @@ int32_t execDdlQuery(SRequestObj* pRequest, SQueryNode* pQuery) {
|
||||||
if (pDcl->msgType == TDMT_VND_SHOW_TABLES) {
|
if (pDcl->msgType == TDMT_VND_SHOW_TABLES) {
|
||||||
SShowReqInfo* pShowReqInfo = &pRequest->body.showInfo;
|
SShowReqInfo* pShowReqInfo = &pRequest->body.showInfo;
|
||||||
if (pShowReqInfo->pArray == NULL) {
|
if (pShowReqInfo->pArray == NULL) {
|
||||||
pShowReqInfo->currentIndex = 0;
|
pShowReqInfo->currentIndex = 0; // set the first vnode/ then iterate the next vnode
|
||||||
pShowReqInfo->pArray = pDcl->pExtension;
|
pShowReqInfo->pArray = pDcl->pExtension;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -568,18 +568,17 @@ int32_t catalogGetDBVgroup(struct SCatalog* pCatalog, void *pRpc, const SEpSet*
|
||||||
CTG_ERR_RET(TSDB_CODE_CTG_INVALID_INPUT);
|
CTG_ERR_RET(TSDB_CODE_CTG_INVALID_INPUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
SDBVgroupInfo* db = NULL;
|
SDBVgroupInfo* db = NULL;
|
||||||
SVgroupInfo *vgInfo = NULL;
|
SVgroupInfo *vgInfo = NULL;
|
||||||
|
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
SArray *vgList = NULL;
|
SArray *vgList = NULL;
|
||||||
|
|
||||||
CTG_ERR_JRET(ctgGetDBVgroup(pCatalog, pRpc, pMgmtEps, dbName, forceUpdate, &db));
|
CTG_ERR_JRET(ctgGetDBVgroup(pCatalog, pRpc, pMgmtEps, dbName, forceUpdate, &db));
|
||||||
|
|
||||||
vgList = taosArrayInit(taosHashGetSize(db->vgInfo), sizeof(SVgroupInfo));
|
vgList = taosArrayInit(taosHashGetSize(db->vgInfo), sizeof(SVgroupInfo));
|
||||||
if (NULL == vgList) {
|
if (NULL == vgList) {
|
||||||
ctgError("taosArrayInit failed");
|
ctgError("taosArrayInit failed");
|
||||||
CTG_ERR_JRET(TSDB_CODE_CTG_MEM_ERROR);
|
CTG_ERR_JRET(TSDB_CODE_CTG_MEM_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *pIter = taosHashIterate(db->vgInfo, NULL);
|
void *pIter = taosHashIterate(db->vgInfo, NULL);
|
||||||
|
@ -599,7 +598,6 @@ int32_t catalogGetDBVgroup(struct SCatalog* pCatalog, void *pRpc, const SEpSet*
|
||||||
vgList = NULL;
|
vgList = NULL;
|
||||||
|
|
||||||
_return:
|
_return:
|
||||||
|
|
||||||
if (db) {
|
if (db) {
|
||||||
CTG_UNLOCK(CTG_READ, &db->lock);
|
CTG_UNLOCK(CTG_READ, &db->lock);
|
||||||
taosHashRelease(pCatalog->dbCache.cache, db);
|
taosHashRelease(pCatalog->dbCache.cache, db);
|
||||||
|
|
|
@ -123,7 +123,7 @@ typedef struct SCreatedTableInfo {
|
||||||
SToken name; // table name token
|
SToken name; // table name token
|
||||||
SToken stbName; // super table name token , for using clause
|
SToken stbName; // super table name token , for using clause
|
||||||
SArray *pTagNames; // create by using super table, tag name
|
SArray *pTagNames; // create by using super table, tag name
|
||||||
SArray *pTagVals; // create by using super table, tag value
|
SArray *pTagVals; // create by using super table, tag value. SArray<SToken>
|
||||||
char *fullname; // table full name
|
char *fullname; // table full name
|
||||||
int8_t igExist; // ignore if exists
|
int8_t igExist; // ignore if exists
|
||||||
} SCreatedTableInfo;
|
} SCreatedTableInfo;
|
||||||
|
|
|
@ -686,7 +686,7 @@ void destroySqlNode(SSqlNode *pSqlNode) {
|
||||||
void freeCreateTableInfo(void* p) {
|
void freeCreateTableInfo(void* p) {
|
||||||
SCreatedTableInfo* pInfo = (SCreatedTableInfo*) p;
|
SCreatedTableInfo* pInfo = (SCreatedTableInfo*) p;
|
||||||
taosArrayDestroy(pInfo->pTagNames);
|
taosArrayDestroy(pInfo->pTagNames);
|
||||||
taosArrayDestroyEx(pInfo->pTagVals, freeItem);
|
taosArrayDestroy(pInfo->pTagVals);
|
||||||
tfree(pInfo->fullname);
|
tfree(pInfo->fullname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -332,7 +332,6 @@ static int32_t doParseSerializeTagValue(SSchema* pTagSchema, int32_t numOfInputT
|
||||||
|
|
||||||
char* endPtr = NULL;
|
char* endPtr = NULL;
|
||||||
char tmpTokenBuf[TSDB_MAX_TAGS_LEN] = {0};
|
char tmpTokenBuf[TSDB_MAX_TAGS_LEN] = {0};
|
||||||
|
|
||||||
SKvParam param = {.builder = pKvRowBuilder, .schema = pSchema};
|
SKvParam param = {.builder = pKvRowBuilder, .schema = pSchema};
|
||||||
|
|
||||||
SToken* pItem = taosArrayGet(pTagValList, i);
|
SToken* pItem = taosArrayGet(pTagValList, i);
|
||||||
|
|
Loading…
Reference in New Issue