From 997d247aa638c06e1baaa68960908b1ef2e3f34b Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 30 Aug 2023 16:58:22 +0800 Subject: [PATCH] fix(stream): remove invalid memset. --- source/libs/stream/src/streamMeta.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/libs/stream/src/streamMeta.c b/source/libs/stream/src/streamMeta.c index 7657e7d3a9..98e7bd8a51 100644 --- a/source/libs/stream/src/streamMeta.c +++ b/source/libs/stream/src/streamMeta.c @@ -165,7 +165,6 @@ SStreamMeta* streamMetaOpen(const char* path, void* ahandle, FTaskExpand expandF int64_t* pRid = taosMemoryMalloc(sizeof(int64_t)); *pRid = pMeta->rid; - memset(tpath, 0, len); sprintf(tpath, "%s/%s", pMeta->path, "state"); code = taosMulModeMkDir(tpath, 0755, false); if (code != 0) { @@ -298,6 +297,10 @@ void streamMetaClear(SStreamMeta* pMeta) { void streamMetaClose(SStreamMeta* pMeta) { qDebug("start to close stream meta"); + if (pMeta == NULL) { + return; + } + // int64_t rid = *(int64_t*)pMeta->pRid; // if (taosTmrStop(pMeta->hbInfo.hbTmr)) { // taosMemoryFree(pMeta->pRid);