Merge pull request #28148 from taosdata/ret_check
ret check for taosMemoryAlloc
This commit is contained in:
commit
f903f5edf0
|
@ -31,7 +31,7 @@
|
||||||
#define CHECK_OUT_OF_MEM(p) \
|
#define CHECK_OUT_OF_MEM(p) \
|
||||||
do { \
|
do { \
|
||||||
if (NULL == (p)) { \
|
if (NULL == (p)) { \
|
||||||
pCxt->errCode = TSDB_CODE_OUT_OF_MEMORY; \
|
pCxt->errCode = terrno; \
|
||||||
goto _err; \
|
goto _err; \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
|
@ -47,6 +47,7 @@ int32_t parse(SParseContext* pParseCxt, SQuery** pQuery) {
|
||||||
SAstCreateContext cxt;
|
SAstCreateContext cxt;
|
||||||
initAstCreateContext(pParseCxt, &cxt);
|
initAstCreateContext(pParseCxt, &cxt);
|
||||||
void* pParser = ParseAlloc((FMalloc)taosMemoryMalloc);
|
void* pParser = ParseAlloc((FMalloc)taosMemoryMalloc);
|
||||||
|
if (!pParser) return terrno;
|
||||||
int32_t i = 0;
|
int32_t i = 0;
|
||||||
while (1) {
|
while (1) {
|
||||||
SToken t0 = {0};
|
SToken t0 = {0};
|
||||||
|
|
Loading…
Reference in New Issue