fix:[TD-31276] check malloc result.
This commit is contained in:
parent
ea923e0a02
commit
a4c120ee28
|
@ -481,6 +481,9 @@ struct SFilterInfo {
|
||||||
#define FILTER_COPY_IDX(dst, src, n) \
|
#define FILTER_COPY_IDX(dst, src, n) \
|
||||||
do { \
|
do { \
|
||||||
*(dst) = taosMemoryMalloc(sizeof(uint32_t) * n); \
|
*(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); \
|
(void)memcpy(*(dst), src, sizeof(uint32_t) * n); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue