fix mem leak
This commit is contained in:
parent
d0beeea917
commit
b6c3e75746
|
@ -318,20 +318,19 @@ void streamFreeTaskState(SStreamTask* pTask, int8_t remove) {
|
||||||
taskDbRemoveRef(pTask->pBackend);
|
taskDbRemoveRef(pTask->pBackend);
|
||||||
pTask->pBackend = NULL;
|
pTask->pBackend = NULL;
|
||||||
pTask->pState = NULL;
|
pTask->pState = NULL;
|
||||||
if (pTask->backendPath != NULL) {
|
|
||||||
taosMemoryFree(pTask->backendPath);
|
|
||||||
pTask->backendPath = NULL;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (remove) {
|
if (remove) {
|
||||||
if (pTask->backendPath != NULL) {
|
if (pTask->backendPath != NULL) {
|
||||||
taosRemoveDir(pTask->backendPath);
|
taosRemoveDir(pTask->backendPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pTask->backendPath != NULL) {
|
||||||
taosMemoryFree(pTask->backendPath);
|
taosMemoryFree(pTask->backendPath);
|
||||||
pTask->backendPath = NULL;
|
pTask->backendPath = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void setInitialVersionInfo(SStreamTask* pTask, int64_t ver) {
|
static void setInitialVersionInfo(SStreamTask* pTask, int64_t ver) {
|
||||||
SCheckpointInfo* pChkInfo = &pTask->chkInfo;
|
SCheckpointInfo* pChkInfo = &pTask->chkInfo;
|
||||||
|
|
Loading…
Reference in New Issue