Merge pull request #27902 from taosdata/fix/memoryAllocCheck
Fix: memory alloc check
This commit is contained in:
commit
eb32a41c29
|
@ -3710,6 +3710,9 @@ int32_t ctgGetTbHashVgroupFromCache(SCatalog *pCtg, const SName *pTableName, SVg
|
|||
}
|
||||
|
||||
*pVgroup = taosMemoryCalloc(1, sizeof(SVgroupInfo));
|
||||
if (NULL == *pVgroup) {
|
||||
CTG_ERR_JRET(terrno);
|
||||
}
|
||||
CTG_ERR_JRET(ctgGetVgInfoFromHashValue(pCtg, NULL, dbCache->vgCache.vgInfo, pTableName, *pVgroup));
|
||||
|
||||
_return:
|
||||
|
|
|
@ -291,6 +291,10 @@ int32_t ctgdHandleDbgCommand(char *command) {
|
|||
}
|
||||
|
||||
char *dup = taosStrdup(command);
|
||||
if (NULL == dup) {
|
||||
CTG_RET(terrno);
|
||||
}
|
||||
|
||||
char *option = NULL;
|
||||
char *param = NULL;
|
||||
|
||||
|
|
|
@ -149,6 +149,9 @@ int32_t mJoinTrimKeepOneRow(SSDataBlock* pBlock, int32_t totalRows, const bool*
|
|||
len = varDataTLen(p1);
|
||||
}
|
||||
char* p2 = taosMemoryMalloc(len);
|
||||
if (NULL == p2) {
|
||||
MJ_ERR_RET(terrno);
|
||||
}
|
||||
TAOS_MEMCPY(p2, p1, len);
|
||||
code = colDataSetVal(pDst, numOfRows, p2, false);
|
||||
if (code) {
|
||||
|
|
|
@ -267,6 +267,9 @@ int32_t schProcessResponseMsg(SSchJob *pJob, SSchTask *pTask, int32_t execId, SD
|
|||
if (pMsg->pData) {
|
||||
SDecoder coder = {0};
|
||||
SSubmitRsp2 *rsp = taosMemoryMalloc(sizeof(*rsp));
|
||||
if (NULL == rsp) {
|
||||
SCH_ERR_JRET(terrno);
|
||||
}
|
||||
tDecoderInit(&coder, pMsg->pData, msgSize);
|
||||
code = tDecodeSSubmitRsp2(&coder, rsp);
|
||||
tDecoderClear(&coder);
|
||||
|
@ -957,6 +960,9 @@ int32_t schUpdateSendTargetInfo(SMsgSendInfo *pMsgSendInfo, SQueryNodeAddr *addr
|
|||
pMsgSendInfo->target.type = TARGET_TYPE_VNODE;
|
||||
pMsgSendInfo->target.vgId = addr->nodeId;
|
||||
pMsgSendInfo->target.dbFName = taosStrdup(pTask->plan->dbFName);
|
||||
if (NULL == pMsgSendInfo->target.dbFName) {
|
||||
return terrno;
|
||||
}
|
||||
}
|
||||
|
||||
return TSDB_CODE_SUCCESS;
|
||||
|
|
Loading…
Reference in New Issue