check func ret

This commit is contained in:
yihaoDeng 2024-08-31 09:10:55 +08:00
parent 724227c5d4
commit 4f38126c6d
1 changed files with 2 additions and 8 deletions

View File

@ -569,6 +569,7 @@ static int32_t idxMayMergeTempToFinalRslt(SArray* result, TFileValue* tfv, SIdxT
indexFatal("failed to merge result since %s", tstrerror(code));
}
} else {
tfileValueDestroy(tfv);
return 0;
}
} else {
@ -591,6 +592,7 @@ static int32_t idxMergeCacheAndTFile(SArray* result, IterateValue* cv, IterateVa
tfileValueDestroy(tfv);
return code;
}
tfv = NULL;
if (cv != NULL) {
uint64_t id = *(uint64_t*)taosArrayGet(cv->val, 0);
@ -601,19 +603,11 @@ static int32_t idxMergeCacheAndTFile(SArray* result, IterateValue* cv, IterateVa
INDEX_MERGE_ADD_DEL(tr->add, tr->del, id)
}
}
if (code != 0) {
tfileValueDestroy(tfv);
return code;
}
if (tv != NULL) {
if (taosArrayAddAll(tr->total, tv->val) == NULL) {
tfileValueDestroy(tfv);
return TSDB_CODE_OUT_OF_MEMORY;
}
}
tfileValueDestroy(tfv);
return 0;
}
static void idxDestroyFinalRslt(SArray* result) {