fix(meta/query): return oom with null ctb cursor

This commit is contained in:
Minglei Jin 2024-08-09 17:06:35 +08:00
parent df4437bc7c
commit b8cd001dfb
1 changed files with 3 additions and 0 deletions

View File

@ -1441,6 +1441,9 @@ int32_t metaGetTableTagsByUids(void *pVnode, int64_t suid, SArray *uidList) {
int32_t metaGetTableTags(void *pVnode, uint64_t suid, SArray *pUidTagInfo) {
SMCtbCursor *pCur = metaOpenCtbCursor(pVnode, suid, 1);
if (!pCur) {
TAOS_RETURN(TSDB_CODE_OUT_OF_MEMORY);
}
// If len > 0 means there already have uids, and we only want the
// tags of the specified tables, of which uid in the uid list. Otherwise, all table tags are retrieved and kept