Merge pull request #4639 from taosdata/hotfix/TD-2437

TD-2437<hotfix>: fix coverity scan problem
This commit is contained in:
huili 2020-12-22 16:11:06 +08:00 committed by GitHub
commit 1fe8254c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -280,7 +280,10 @@ bool tSkipListIterNext(SSkipListIterator *iter) {
tSkipListRLock(pSkipList); tSkipListRLock(pSkipList);
if (iter->order == TSDB_ORDER_ASC) { if (iter->order == TSDB_ORDER_ASC) {
if (iter->cur == pSkipList->pTail) return false; if (iter->cur == pSkipList->pTail) {
tSkipListUnlock(pSkipList);
return false;
}
iter->cur = SL_NODE_GET_FORWARD_POINTER(iter->cur, 0); iter->cur = SL_NODE_GET_FORWARD_POINTER(iter->cur, 0);
// a new node is inserted into between iter->cur and iter->next, ignore it // a new node is inserted into between iter->cur and iter->next, ignore it