From 0f0060f8c3a3a5de1580011f5790171846755e5d Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Sat, 21 May 2022 17:04:13 +0800 Subject: [PATCH] fix: add a null ptr check. --- source/util/src/thash.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/util/src/thash.c b/source/util/src/thash.c index 89fc446da9..18404f8bde 100644 --- a/source/util/src/thash.c +++ b/source/util/src/thash.c @@ -778,7 +778,9 @@ static void *taosHashReleaseNode(SHashObj *pHashObj, void *p, int *slot) { } else { pe->next = pOld->next; SHashNode* x = pe->next; - ASSERT(x->next != x); + if (x != NULL) { + ASSERT(x->next != x); + } } pe->num--;