fix double free issue
This commit is contained in:
parent
d51559961d
commit
d857013517
|
@ -7786,6 +7786,7 @@ int32_t validateSqlNode(SSqlObj* pSql, SSqlNode* pSqlNode, SQueryInfo* pQueryInf
|
||||||
const char* msg5 = "only tag query not compatible with normal column filter";
|
const char* msg5 = "only tag query not compatible with normal column filter";
|
||||||
const char* msg6 = "not support stddev/percentile in outer query yet";
|
const char* msg6 = "not support stddev/percentile in outer query yet";
|
||||||
const char* msg7 = "drivative requires timestamp column exists in subquery";
|
const char* msg7 = "drivative requires timestamp column exists in subquery";
|
||||||
|
const char* msg8 = "condition missing for join query";
|
||||||
|
|
||||||
int32_t code = TSDB_CODE_SUCCESS;
|
int32_t code = TSDB_CODE_SUCCESS;
|
||||||
|
|
||||||
|
@ -7863,6 +7864,10 @@ int32_t validateSqlNode(SSqlObj* pSql, SSqlNode* pSqlNode, SQueryInfo* pQueryInf
|
||||||
if (validateWhereNode(pQueryInfo, &pSqlNode->pWhere, pSql) != TSDB_CODE_SUCCESS) {
|
if (validateWhereNode(pQueryInfo, &pSqlNode->pWhere, pSql) != TSDB_CODE_SUCCESS) {
|
||||||
return TSDB_CODE_TSC_INVALID_OPERATION;
|
return TSDB_CODE_TSC_INVALID_OPERATION;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (pQueryInfo->numOfTables > 1) {
|
||||||
|
return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg8);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate the interval info
|
// validate the interval info
|
||||||
|
|
|
@ -4077,7 +4077,10 @@ SVgroupsInfo* tscVgroupsInfoDup(SVgroupsInfo* pVgroupsInfo) {
|
||||||
|
|
||||||
size_t size = sizeof(SVgroupInfo) * pVgroupsInfo->numOfVgroups + sizeof(SVgroupsInfo);
|
size_t size = sizeof(SVgroupInfo) * pVgroupsInfo->numOfVgroups + sizeof(SVgroupsInfo);
|
||||||
SVgroupsInfo* pInfo = calloc(1, size);
|
SVgroupsInfo* pInfo = calloc(1, size);
|
||||||
memcpy(pInfo, pVgroupsInfo, size);
|
pInfo->numOfVgroups = pVgroupsInfo->numOfVgroups;
|
||||||
|
for (int32_t m = 0; m < pVgroupsInfo->numOfVgroups; ++m) {
|
||||||
|
tscSVgroupInfoCopy(&pInfo->vgroups[m], &pVgroupsInfo->vgroups[m]);
|
||||||
|
}
|
||||||
return pInfo;
|
return pInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue