fix mem leak

This commit is contained in:
yihaoDeng 2024-08-16 21:01:02 +08:00
parent 6bdbbc4b15
commit 367b6eee72
2 changed files with 6 additions and 4 deletions

View File

@ -453,8 +453,8 @@ struct SStreamTask {
SSHashObj* pNameMap;
void* pBackend;
int8_t subtableWithoutMd5;
char reserve[256];
char* backendPath;
char reserve[256 - sizeof(char*)];
};
typedef int32_t (*startComplete_fn_t)(struct SStreamMeta*);

View File

@ -298,7 +298,6 @@ void tFreeStreamTask(SStreamTask* pTask) {
taosArrayDestroy(pTask->outputInfo.pNodeEpsetUpdateList);
pTask->outputInfo.pNodeEpsetUpdateList = NULL;
if (pTask->id.idStr != NULL) {
taosMemoryFree((void*)pTask->id.idStr);
}
@ -496,10 +495,13 @@ int32_t streamTaskInit(SStreamTask* pTask, SStreamMeta* pMeta, SMsgCb* pMsgCb, i
if (pTask->chkInfo.pActiveInfo == NULL) {
code = streamTaskCreateActiveChkptInfo(&pTask->chkInfo.pActiveInfo);
if (code) {
stError("s-task:%s failed to create active checkpoint info, code:%s", pTask->id.idStr, tstrerror(code));
return code;
}
}
code = streamTaskSetBackendPath(pTask);
return code;
return streamTaskSetBackendPath(pTask);
}
int32_t streamTaskGetNumOfDownstream(const SStreamTask* pTask) {