提交 877c707c 编写于 作者: H Haojun Liao

fix(query): fix memory leak in last_row query

上级 4b1e8e0c
...@@ -590,7 +590,10 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow) { ...@@ -590,7 +590,10 @@ static int32_t getNextRowFromFS(void *iter, TSDBROW **ppRow) {
goto _next_fileset; goto _next_fileset;
} }
tMapDataReset(&state->blockMap); if (state->blockMap.pData != NULL) {
tMapDataClear(&state->blockMap);
}
code = tsdbReadDataBlk(state->pDataFReader, state->pBlockIdx, &state->blockMap); code = tsdbReadDataBlk(state->pDataFReader, state->pBlockIdx, &state->blockMap);
if (code) goto _err; if (code) goto _err;
...@@ -695,6 +698,10 @@ int32_t clearNextRowFromFS(void *iter) { ...@@ -695,6 +698,10 @@ int32_t clearNextRowFromFS(void *iter) {
state->pBlockData = NULL; state->pBlockData = NULL;
} }
if (state->blockMap.pData != NULL) {
tMapDataClear(&state->blockMap);
}
return code; return code;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册