Fix the issue #130, reference count may have a problem

This commit is contained in:
slguan 2019-07-20 17:31:34 +08:00
parent 6788a4222c
commit 401d046b70
1 changed files with 1 additions and 1 deletions

View File

@ -522,7 +522,7 @@ void *taosGetDataFromCache(void *handle, char *key) {
pthread_rwlock_rdlock(&pObj->lock);
SDataNode *ptNode = taosGetNodeFromHashTable(handle, key, keyLen);
if (ptNode != NULL) {
ptNode->refCount += 1;
__sync_add_and_fetch_32(&ptNode->refCount, 1);
}
pthread_rwlock_unlock(&pObj->lock);