Merge pull request #19338 from taosdata/fix/TD-21697

fix: td-21697
This commit is contained in:
Shengliang Guan 2023-01-07 10:55:09 +08:00 committed by GitHub
commit 8c042f0eef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 13 deletions

View File

@ -121,6 +121,12 @@ void tsortClearOrderdSource(SArray *pOrderedSource) {
if ((*pSource)->param && !(*pSource)->onlyRef) {
taosMemoryFree((*pSource)->param);
}
if (!(*pSource)->onlyRef && (*pSource)->src.pBlock) {
blockDataDestroy((*pSource)->src.pBlock);
(*pSource)->src.pBlock = NULL;
}
taosMemoryFreeClear(*pSource);
}
@ -659,6 +665,10 @@ static int32_t createInitialSources(SSortHandle* pHandle) {
if (source->param && !source->onlyRef) {
taosMemoryFree(source->param);
}
if (!source->onlyRef && source->src.pBlock) {
blockDataDestroy(source->src.pBlock);
source->src.pBlock = NULL;
}
taosMemoryFree(source);
return code;
}
@ -672,6 +682,10 @@ static int32_t createInitialSources(SSortHandle* pHandle) {
if (source->param && !source->onlyRef) {
taosMemoryFree(source->param);
}
if (!source->onlyRef && source->src.pBlock) {
blockDataDestroy(source->src.pBlock);
source->src.pBlock = NULL;
}
taosMemoryFree(source);
return code;
}

View File

@ -101,13 +101,6 @@ typedef void* queue[2];
#define TRANS_PACKET_LIMIT 1024 * 1024 * 512
#define TRANS_MAGIC_NUM 0x5f375a86
#define TRANS_NOVALID_PACKET(src) ((src) != TRANS_MAGIC_NUM ? 1 : 0)
#define TRANS_PACKET_LIMIT 1024 * 1024 * 512
#define TRANS_MAGIC_NUM 0x5f375a86
#define TRANS_NOVALID_PACKET(src) ((src) != TRANS_MAGIC_NUM ? 1 : 0)
typedef SRpcMsg STransMsg;