diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index 2d5edcb01b..78ecd55c64 100644 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -7254,6 +7254,7 @@ static int32_t buildCmdMsg(STranslateContext* pCxt, int16_t msgType, FSerializeF pCxt->pCmdMsg->msgLen = func(NULL, 0, pReq); pCxt->pCmdMsg->pMsg = taosMemoryMalloc(pCxt->pCmdMsg->msgLen); if (NULL == pCxt->pCmdMsg->pMsg) { + taosMemoryFreeClear(pCxt->pCmdMsg); return TSDB_CODE_OUT_OF_MEMORY; } func(pCxt->pCmdMsg->pMsg, pCxt->pCmdMsg->msgLen, pReq); diff --git a/tests/script/tsim/show/basic.sim b/tests/script/tsim/show/basic.sim index 8990e492fa..4b2e33b45e 100644 --- a/tests/script/tsim/show/basic.sim +++ b/tests/script/tsim/show/basic.sim @@ -230,7 +230,7 @@ endi sql_error show create stable t0; sql show variables; -if $rows != 4 then +if $rows != 9 then return -1 endi diff --git a/tests/script/tsim/valgrind/checkError1.sim b/tests/script/tsim/valgrind/checkError1.sim index debe633f06..5629fbb4bd 100644 --- a/tests/script/tsim/valgrind/checkError1.sim +++ b/tests/script/tsim/valgrind/checkError1.sim @@ -120,7 +120,7 @@ if $rows != 3 then endi sql show variables; -if $rows != 4 then +if $rows != 9 then return -1 endi diff --git a/tests/system-test/2-query/db.py b/tests/system-test/2-query/db.py index cfe224acb0..e2c056cd5b 100644 --- a/tests/system-test/2-query/db.py +++ b/tests/system-test/2-query/db.py @@ -45,7 +45,7 @@ class TDTestCase: def case2(self): tdSql.query("show variables") - tdSql.checkRows(4) + tdSql.checkRows(9) for i in range(self.replicaVar): tdSql.query("show dnode %d variables like 'debugFlag'" % (i + 1))