提交 364e023b 编写于 作者: H Haojun Liao

fix(query): fix memory leak.

上级 28559dc4
......@@ -63,7 +63,7 @@ int32_t inserterCallback(void* param, SDataBuf* pMsg, int32_t code) {
tDecoderInit(&coder, pMsg->pData, pMsg->len);
code = tDecodeSSubmitRsp2(&coder, pInserter->submitRes.pRsp);
if (code) {
// tFreeSSubmitRsp(pInserter->submitRes.pRsp);
taosMemoryFree(pInserter->submitRes.pRsp);
pInserter->submitRes.code = code;
goto _return;
}
......@@ -76,7 +76,7 @@ int32_t inserterCallback(void* param, SDataBuf* pMsg, int32_t code) {
SVCreateTbRsp* pRsp = taosArrayGet(pCreateTbList, i);
if (TSDB_CODE_SUCCESS != pRsp->code) {
code = pRsp->code;
// tFreeSSubmitRsp(pInserter->submitRes.pRsp);
taosMemoryFree(pInserter->submitRes.pRsp);
pInserter->submitRes.code = code;
goto _return;
}
......@@ -87,8 +87,8 @@ int32_t inserterCallback(void* param, SDataBuf* pMsg, int32_t code) {
// pInserter->submitRes.affectedRows += pInserter->submitRes.
qDebug("submit rsp received, affectedRows:%d, total:%"PRId64, pInserter->submitRes.pRsp->affectedRows,
pInserter->submitRes.affectedRows);
// tFreeSSubmitRsp(pInserter->submitRes.pRsp);
tDecoderClear(&coder);
taosMemoryFree(pInserter->submitRes.pRsp);
}
_return:
......
......@@ -18,7 +18,7 @@ class TDTestCase:
def init(self, conn, logSql, replicaVar=1):
self.replicaVar = int(replicaVar)
tdLog.debug(f"start to excute {__file__}")
tdSql.init(conn.cursor())
tdSql.init(conn.cursor(), True)
#tdSql.init(conn.cursor(), logSql) # output sql.txt file
def checkFileContent(self, dbname="sml_db"):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册