From 6b3f4e837dcdc22d4a12f2feec434c8590e2973f Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 23 Sep 2022 15:28:25 +0800 Subject: [PATCH] fix(tsc): fix invalid free --- include/common/tmsg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index ac6ce82ffb..c4a4e92648 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -2337,6 +2337,7 @@ int32_t tSerializeSClientHbBatchReq(void* buf, int32_t bufLen, const SClientHbBa int32_t tDeserializeSClientHbBatchReq(void* buf, int32_t bufLen, SClientHbBatchReq* pReq); static FORCE_INLINE void tFreeClientHbBatchReq(void* pReq) { + if (pReq == NULL) return; SClientHbBatchReq* req = (SClientHbBatchReq*)pReq; taosArrayDestroyEx(req->reqs, tFreeClientHbReq); taosMemoryFree(pReq);