fix(stream): fix memory leak.
This commit is contained in:
parent
c166c8de70
commit
2c86e3940f
|
@ -152,6 +152,7 @@ void mndCleanupStream(SMnode *pMnode) {
|
|||
taosHashCleanup(execInfo.transMgmt.pDBTrans);
|
||||
taosHashCleanup(execInfo.pTransferStateStreams);
|
||||
taosHashCleanup(execInfo.pChkptStreams);
|
||||
taosHashCleanup(execInfo.pStreamConsensus);
|
||||
taosThreadMutexDestroy(&execInfo.lock);
|
||||
mDebug("mnd stream exec info cleanup");
|
||||
}
|
||||
|
|
|
@ -1893,8 +1893,12 @@ void* taskDbAddRef(void* pTaskDb) {
|
|||
STaskDbWrapper* pBackend = pTaskDb;
|
||||
return taosAcquireRef(taskDbWrapperId, pBackend->refId);
|
||||
}
|
||||
|
||||
void taskDbRemoveRef(void* pTaskDb) {
|
||||
if (pTaskDb == NULL) return;
|
||||
if (pTaskDb == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
STaskDbWrapper* pBackend = pTaskDb;
|
||||
taosReleaseRef(taskDbWrapperId, pBackend->refId);
|
||||
}
|
||||
|
|
|
@ -273,6 +273,7 @@ void tFreeStreamTask(SStreamTask* pTask) {
|
|||
stDebug("s-task:0x%x start to free task state", taskId);
|
||||
streamStateClose(pTask->pState, status1 == TASK_STATUS__DROPPING);
|
||||
taskDbRemoveRef(pTask->pBackend);
|
||||
pTask->pBackend = NULL;
|
||||
}
|
||||
|
||||
if (pTask->pNameMap) {
|
||||
|
|
Loading…
Reference in New Issue