fix:[TD-31443] Reset field nums in SFilterFields when malloc failed.
This commit is contained in:
parent
084592dc34
commit
e405d934e8
|
@ -1066,6 +1066,7 @@ int32_t filterAddField(SFilterInfo *info, void *desc, void **data, int32_t type,
|
||||||
info->fields[type].fields =
|
info->fields[type].fields =
|
||||||
taosMemoryRealloc(info->fields[type].fields, info->fields[type].size * sizeof(SFilterField));
|
taosMemoryRealloc(info->fields[type].fields, info->fields[type].size * sizeof(SFilterField));
|
||||||
if (info->fields[type].fields == NULL) {
|
if (info->fields[type].fields == NULL) {
|
||||||
|
*num = 0;
|
||||||
fltError("taosMemoryRealloc failed, size:%d", (int32_t)(info->fields[type].size * sizeof(SFilterField)));
|
fltError("taosMemoryRealloc failed, size:%d", (int32_t)(info->fields[type].size * sizeof(SFilterField)));
|
||||||
FLT_ERR_RET(terrno);
|
FLT_ERR_RET(terrno);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue