提交 d383dcd5 编写于 作者: dengyihao's avatar dengyihao

fix mem leak

上级 b5dbc843
...@@ -656,6 +656,10 @@ static int32_t createInitialSources(SSortHandle* pHandle) { ...@@ -656,6 +656,10 @@ static int32_t createInitialSources(SSortHandle* pHandle) {
if (source->param && !source->onlyRef) { if (source->param && !source->onlyRef) {
taosMemoryFree(source->param); taosMemoryFree(source->param);
} }
if (!source->onlyRef && source->src.pBlock) {
blockDataDestroy(source->src.pBlock);
source->src.pBlock = NULL;
}
taosMemoryFree(source); taosMemoryFree(source);
return code; return code;
} }
...@@ -669,6 +673,10 @@ static int32_t createInitialSources(SSortHandle* pHandle) { ...@@ -669,6 +673,10 @@ static int32_t createInitialSources(SSortHandle* pHandle) {
if (source->param && !source->onlyRef) { if (source->param && !source->onlyRef) {
taosMemoryFree(source->param); taosMemoryFree(source->param);
} }
if (!source->onlyRef && source->src.pBlock) {
blockDataDestroy(source->src.pBlock);
source->src.pBlock = NULL;
}
taosMemoryFree(source); taosMemoryFree(source);
return code; return code;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册