ret check for taosMemoryAlloc

This commit is contained in:
wangjiaming0909 2024-09-27 09:09:45 +08:00
parent 3e04f78b40
commit 420482720f
2 changed files with 7 additions and 6 deletions

View File

@ -28,12 +28,12 @@
} \
} while (0)
#define CHECK_OUT_OF_MEM(p) \
do { \
if (NULL == (p)) { \
pCxt->errCode = TSDB_CODE_OUT_OF_MEMORY; \
goto _err; \
} \
#define CHECK_OUT_OF_MEM(p) \
do { \
if (NULL == (p)) { \
pCxt->errCode = terrno; \
goto _err; \
} \
} while (0)
#define CHECK_PARSER_STATUS(pCxt) \

View File

@ -47,6 +47,7 @@ int32_t parse(SParseContext* pParseCxt, SQuery** pQuery) {
SAstCreateContext cxt;
initAstCreateContext(pParseCxt, &cxt);
void* pParser = ParseAlloc((FMalloc)taosMemoryMalloc);
if (!pParser) return terrno;
int32_t i = 0;
while (1) {
SToken t0 = {0};