From 4532bcdf4e89febddf75e74c363d7767e25b62b6 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Tue, 26 Jul 2022 13:26:29 +0800 Subject: [PATCH] fix(query):set ptr to be null after releasing resources. --- source/dnode/vnode/src/tsdb/tsdbUtil.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/dnode/vnode/src/tsdb/tsdbUtil.c b/source/dnode/vnode/src/tsdb/tsdbUtil.c index 872357fc93..805e49a705 100644 --- a/source/dnode/vnode/src/tsdb/tsdbUtil.c +++ b/source/dnode/vnode/src/tsdb/tsdbUtil.c @@ -24,6 +24,8 @@ void tMapDataReset(SMapData *pMapData) { void tMapDataClear(SMapData *pMapData) { tFree((uint8_t *)pMapData->aOffset); tFree(pMapData->pData); + pMapData->pData = NULL; + pMapData->aOffset = NULL; } int32_t tMapDataPutItem(SMapData *pMapData, void *pItem, int32_t (*tPutItemFn)(uint8_t *, void *)) {