fix(query)[TD-33008]. fix error handling in tsdbCacheRead

Fix an issue that a freed null pointer was accessed during error
handling in tsdbCacheRead, which would cause a crash.
This commit is contained in:
Jinqing Kuang 2024-11-25 15:09:11 +08:00
parent 062a8a2831
commit 7bbda0c92a
1 changed files with 2 additions and 1 deletions

View File

@ -346,7 +346,8 @@ int32_t tsdbCacherowsReaderOpen(void* pVnode, int32_t type, void* pTableIdList,
p->rowKey.pks[0].pData = taosMemoryCalloc(1, pPkCol->bytes);
if (p->rowKey.pks[0].pData == NULL) {
taosMemoryFreeClear(p);
TSDB_CHECK_NULL(p->rowKey.pks[0].pData, code, lino, _end, terrno);
code = terrno;
TSDB_CHECK_CODE(code, lino, _end);
}
}