From 798e7f2c99338f30d790a2a984e65e7e1a3ca2ca Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Sat, 11 Jul 2020 14:39:03 +0000 Subject: [PATCH] [TD-888] add protection while deplayed process mnode msg --- src/mnode/src/mnodeSdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mnode/src/mnodeSdb.c b/src/mnode/src/mnodeSdb.c index 46678cb133..d3192a2460 100644 --- a/src/mnode/src/mnodeSdb.c +++ b/src/mnode/src/mnodeSdb.c @@ -393,7 +393,7 @@ void sdbCleanUp() { } void sdbIncRef(void *handle, void *pObj) { - if (pObj == NULL) return; + if (pObj == NULL || handle == NULL) return; SSdbTable *pTable = handle; int32_t * pRefCount = (int32_t *)(pObj + pTable->refCountPos); @@ -402,7 +402,7 @@ void sdbIncRef(void *handle, void *pObj) { } void sdbDecRef(void *handle, void *pObj) { - if (pObj == NULL) return; + if (pObj == NULL || handle == NULL) return; SSdbTable *pTable = handle; int32_t * pRefCount = (int32_t *)(pObj + pTable->refCountPos); -- GitLab