fix:[TD-31276] check malloc result.

This commit is contained in:
sima 2024-08-06 17:58:38 +08:00
parent ea923e0a02
commit a4c120ee28
1 changed files with 3 additions and 0 deletions

View File

@ -481,6 +481,9 @@ struct SFilterInfo {
#define FILTER_COPY_IDX(dst, src, n) \
do { \
*(dst) = taosMemoryMalloc(sizeof(uint32_t) * n); \
if (NULL == *(dst)) { \
FLT_ERR_JRET(TSDB_CODE_OUT_OF_MEMORY); \
} \
(void)memcpy(*(dst), src, sizeof(uint32_t) * n); \
} while (0)