parent
f4c290d545
commit
c12f1b6e6a
|
@ -1135,7 +1135,12 @@ int32_t filterAddUnit(SFilterInfo *info, uint8_t optr, SFilterFieldId *left, SFi
|
||||||
int32_t filterAddUnitToGroup(SFilterGroup *group, uint32_t unitIdx) {
|
int32_t filterAddUnitToGroup(SFilterGroup *group, uint32_t unitIdx) {
|
||||||
if (group->unitNum >= group->unitSize) {
|
if (group->unitNum >= group->unitSize) {
|
||||||
group->unitSize += FILTER_DEFAULT_UNIT_SIZE;
|
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;
|
group->unitIdxs[group->unitNum++] = unitIdx;
|
||||||
|
|
Loading…
Reference in New Issue