Merge pull request #28148 from taosdata/ret_check

ret check for taosMemoryAlloc
This commit is contained in:
Pan Wei 2024-09-27 14:59:11 +08:00 committed by GitHub
commit f903f5edf0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View File

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

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};