From 98771bb461ce1b8aaa3ee5f4973c7d96b76fb728 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 26 Nov 2022 01:50:17 +0800 Subject: [PATCH] fix(query): deprecate the error reported by asan. --- source/dnode/vnode/src/meta/metaCache.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/dnode/vnode/src/meta/metaCache.c b/source/dnode/vnode/src/meta/metaCache.c index 45f70e1c92..c590f0d014 100644 --- a/source/dnode/vnode/src/meta/metaCache.c +++ b/source/dnode/vnode/src/meta/metaCache.c @@ -497,17 +497,17 @@ int32_t metaUidFilterCachePut(SMeta* pMeta, uint64_t suid, const void* pKey, int SLRUCache* pCache = pMeta->pCache->sTagFilterResCache.pUidResCache; SHashObj* pTableEntry = pMeta->pCache->sTagFilterResCache.pTableEntry; - void* pEntry = taosHashGet(pMeta->pCache->sTagFilterResCache.pTableEntry, &suid, sizeof(uint64_t)); + STagFilterResEntry** pEntry = taosHashGet(pMeta->pCache->sTagFilterResCache.pTableEntry, &suid, sizeof(uint64_t)); if (pEntry == NULL) { STagFilterResEntry* p = taosMemoryMalloc(sizeof(STagFilterResEntry)); p->qTimes = 0; tdListInit(&p->list, keyLen); - - pEntry = &p; - taosHashPut(pTableEntry, &suid, sizeof(uint64_t), pEntry, POINTER_BYTES); + taosHashPut(pTableEntry, &suid, sizeof(uint64_t), &p, POINTER_BYTES); + tdListAppend(&p->list, pKey); + } else { + tdListAppend(&(*pEntry)->list, pKey); } - tdListAppend(&(*(STagFilterResEntry**)pEntry)->list, pKey); uint64_t* pBuf = pMeta->pCache->sTagFilterResCache.keyBuf; pBuf[0] = suid;