fix(query): fix memory leak.
This commit is contained in:
parent
28559dc41c
commit
364e023ba5
|
@ -63,7 +63,7 @@ int32_t inserterCallback(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
tDecoderInit(&coder, pMsg->pData, pMsg->len);
|
tDecoderInit(&coder, pMsg->pData, pMsg->len);
|
||||||
code = tDecodeSSubmitRsp2(&coder, pInserter->submitRes.pRsp);
|
code = tDecodeSSubmitRsp2(&coder, pInserter->submitRes.pRsp);
|
||||||
if (code) {
|
if (code) {
|
||||||
// tFreeSSubmitRsp(pInserter->submitRes.pRsp);
|
taosMemoryFree(pInserter->submitRes.pRsp);
|
||||||
pInserter->submitRes.code = code;
|
pInserter->submitRes.code = code;
|
||||||
goto _return;
|
goto _return;
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ int32_t inserterCallback(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
SVCreateTbRsp* pRsp = taosArrayGet(pCreateTbList, i);
|
SVCreateTbRsp* pRsp = taosArrayGet(pCreateTbList, i);
|
||||||
if (TSDB_CODE_SUCCESS != pRsp->code) {
|
if (TSDB_CODE_SUCCESS != pRsp->code) {
|
||||||
code = pRsp->code;
|
code = pRsp->code;
|
||||||
// tFreeSSubmitRsp(pInserter->submitRes.pRsp);
|
taosMemoryFree(pInserter->submitRes.pRsp);
|
||||||
pInserter->submitRes.code = code;
|
pInserter->submitRes.code = code;
|
||||||
goto _return;
|
goto _return;
|
||||||
}
|
}
|
||||||
|
@ -87,8 +87,8 @@ int32_t inserterCallback(void* param, SDataBuf* pMsg, int32_t code) {
|
||||||
// pInserter->submitRes.affectedRows += pInserter->submitRes.
|
// pInserter->submitRes.affectedRows += pInserter->submitRes.
|
||||||
qDebug("submit rsp received, affectedRows:%d, total:%"PRId64, pInserter->submitRes.pRsp->affectedRows,
|
qDebug("submit rsp received, affectedRows:%d, total:%"PRId64, pInserter->submitRes.pRsp->affectedRows,
|
||||||
pInserter->submitRes.affectedRows);
|
pInserter->submitRes.affectedRows);
|
||||||
|
tDecoderClear(&coder);
|
||||||
// tFreeSSubmitRsp(pInserter->submitRes.pRsp);
|
taosMemoryFree(pInserter->submitRes.pRsp);
|
||||||
}
|
}
|
||||||
|
|
||||||
_return:
|
_return:
|
||||||
|
|
|
@ -18,7 +18,7 @@ class TDTestCase:
|
||||||
def init(self, conn, logSql, replicaVar=1):
|
def init(self, conn, logSql, replicaVar=1):
|
||||||
self.replicaVar = int(replicaVar)
|
self.replicaVar = int(replicaVar)
|
||||||
tdLog.debug(f"start to excute {__file__}")
|
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
|
#tdSql.init(conn.cursor(), logSql) # output sql.txt file
|
||||||
|
|
||||||
def checkFileContent(self, dbname="sml_db"):
|
def checkFileContent(self, dbname="sml_db"):
|
||||||
|
|
Loading…
Reference in New Issue