fix: add a null ptr check.

This commit is contained in:
Haojun Liao 2022-05-21 17:04:13 +08:00
parent ff615a066c
commit 0f0060f8c3
1 changed files with 3 additions and 1 deletions

View File

@ -778,8 +778,10 @@ static void *taosHashReleaseNode(SHashObj *pHashObj, void *p, int *slot) {
} else { } else {
pe->next = pOld->next; pe->next = pOld->next;
SHashNode* x = pe->next; SHashNode* x = pe->next;
if (x != NULL) {
ASSERT(x->next != x); ASSERT(x->next != x);
} }
}
pe->num--; pe->num--;
atomic_sub_fetch_64(&pHashObj->size, 1); atomic_sub_fetch_64(&pHashObj->size, 1);