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