fix mem leak
This commit is contained in:
parent
b55618149b
commit
a82856dff7
|
@ -171,6 +171,7 @@ typedef struct {
|
|||
int32_t taskId;
|
||||
int64_t streamId;
|
||||
int64_t streamBackendRid;
|
||||
int8_t dump;
|
||||
} SStreamState;
|
||||
|
||||
typedef struct SFunctionStateStore {
|
||||
|
|
|
@ -409,8 +409,10 @@ void destroyStreamFinalIntervalOperatorInfo(void* param) {
|
|||
blockDataDestroy(pInfo->pDelRes);
|
||||
pInfo->stateStore.streamFileStateDestroy(pInfo->pState->pFileState);
|
||||
|
||||
if (pInfo->pState->dump == 1) {
|
||||
taosMemoryFreeClear(pInfo->pState->pTdbState->pOwner);
|
||||
taosMemoryFreeClear(pInfo->pState->pTdbState);
|
||||
}
|
||||
taosMemoryFreeClear(pInfo->pState);
|
||||
|
||||
nodesDestroyNode((SNode*)pInfo->pPhyNode);
|
||||
|
|
|
@ -1117,10 +1117,11 @@ int32_t streamStateDeleteCheckPoint(SStreamState* pState, TSKEY mark) {
|
|||
void streamStateReloadInfo(SStreamState* pState, TSKEY ts) { streamFileStateReloadInfo(pState->pFileState, ts); }
|
||||
|
||||
void streamStateCopyBackend(SStreamState* src, SStreamState* dst) {
|
||||
if (dst->pFileState == NULL) {
|
||||
if (dst->pTdbState == NULL) {
|
||||
dst->pTdbState = taosMemoryCalloc(1, sizeof(STdbState));
|
||||
dst->pTdbState->pOwner = taosMemoryCalloc(1, sizeof(SStreamTask));
|
||||
}
|
||||
dst->dump = 1;
|
||||
dst->pTdbState->pOwner->pBackend = src->pTdbState->pOwner->pBackend;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue