diff --git a/src/util/src/tcache.c b/src/util/src/tcache.c index 2432e975525246b3ea83c5d826ab515480128869..4e2c41d1bccad4e4eaf0956bf5af03d6e6fb7c86 100644 --- a/src/util/src/tcache.c +++ b/src/util/src/tcache.c @@ -436,8 +436,8 @@ void taosCacheRelease(SCacheObj *pCacheObj, void **data, bool _remove) { taosRemoveFromTrashCan(pCacheObj, pNode->pTNodeHeader); } } else { - int32_t success = taosHashRemove(pCacheObj->pHashTable, pNode->key, pNode->keySize); - if (success) { + int32_t ret = taosHashRemove(pCacheObj->pHashTable, pNode->key, pNode->keySize); + if (ret == 0) { if (ref > 0) { assert(pNode->pTNodeHeader == NULL);