diff --git a/source/client/src/clientSqlMonitor.c b/source/client/src/clientSqlMonitor.c index 80375bafae..7c54eb7b01 100644 --- a/source/client/src/clientSqlMonitor.c +++ b/source/client/src/clientSqlMonitor.c @@ -52,8 +52,10 @@ void sqlReqLog(int64_t rid, bool killed, int32_t code) { if (pTscObj != NULL) { if (pTscObj->pAppInfo == NULL) { tscLog("sqlReqLog, not found pAppInfo"); + } else { + clientSQLReqLog(pTscObj->pAppInfo->instKey, pTscObj->user, result); } - return clientSQLReqLog(pTscObj->pAppInfo->instKey, pTscObj->user, result); + releaseTscObj(rid); } else { tscLog("sqlReqLog, not found rid"); } diff --git a/source/client/src/slowQueryMonitor.c b/source/client/src/slowQueryMonitor.c index c4c623c7be..61add665dc 100644 --- a/source/client/src/slowQueryMonitor.c +++ b/source/client/src/slowQueryMonitor.c @@ -69,8 +69,10 @@ void SlowQueryLog(int64_t rid, bool killed, int32_t code, int32_t cost) { if (pTscObj != NULL) { if(pTscObj->pAppInfo == NULL) { tscLog("SlowQueryLog, not found pAppInfo"); + } else { + clientSlowQueryLog(pTscObj->pAppInfo->instKey, pTscObj->user, result, cost); } - return clientSlowQueryLog(pTscObj->pAppInfo->instKey, pTscObj->user, result, cost); + releaseTscObj(rid); } else { tscLog("SlowQueryLog, not found rid"); }