提交 c12f1b6e 编写于 作者: G Ganlin Zhao

fix: coverity issues

CID: 399890
上级 f4c290d5
......@@ -1135,7 +1135,12 @@ int32_t filterAddUnit(SFilterInfo *info, uint8_t optr, SFilterFieldId *left, SFi
int32_t filterAddUnitToGroup(SFilterGroup *group, uint32_t unitIdx) {
if (group->unitNum >= group->unitSize) {
group->unitSize += FILTER_DEFAULT_UNIT_SIZE;
group->unitIdxs = taosMemoryRealloc(group->unitIdxs, group->unitSize * sizeof(*group->unitIdxs));
void *tmp = taosMemoryRealloc(group->unitIdxs, group->unitSize * sizeof(*group->unitIdxs));
if (tmp == NULL) {
return TSDB_CODE_OUT_OF_MEMORY;
}
group->unitIdxs = tmp;
}
group->unitIdxs[group->unitNum++] = unitIdx;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册