enh: code optimization

This commit is contained in:
kailixu 2024-08-14 22:20:03 +08:00
parent 462748e715
commit 1059650e57
1 changed files with 1 additions and 5 deletions

View File

@ -1440,11 +1440,7 @@ static int32_t tsdbCacheLoadFromRaw(STsdb *pTsdb, tb_uid_t uid, SArray *pLastArr
int lastrowIndex = 0; int lastrowIndex = 0;
if (!slotIds || !lastColIds || !lastSlotIds || !lastrowColIds || !lastrowSlotIds) { if (!slotIds || !lastColIds || !lastSlotIds || !lastrowColIds || !lastrowSlotIds) {
taosMemoryFree(slotIds); TAOS_CHECK_EXIT(TSDB_CODE_OUT_OF_MEMORY);
taosMemoryFree(lastColIds);
taosMemoryFree(lastSlotIds);
taosMemoryFree(lastrowColIds);
TAOS_RETURN(TSDB_CODE_OUT_OF_MEMORY);
} }
for (int i = 0; i < num_keys; ++i) { for (int i = 0; i < num_keys; ++i) {