From cc23ecedac7786fde741614ce3745a21f7435689 Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Wed, 11 Jan 2023 14:50:18 +0800 Subject: [PATCH] fix:add logic for ins_columns --- include/common/tmsg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/common/tmsg.h b/include/common/tmsg.h index 678a744950..b9caed7a89 100644 --- a/include/common/tmsg.h +++ b/include/common/tmsg.h @@ -383,9 +383,9 @@ static FORCE_INLINE void tDeleteSSchemaWrapper(SSchemaWrapper* pSchemaWrapper) { } static FORCE_INLINE void tDeleteSSchemaWrapperForHash(void* pSchemaWrapper) { - if (pSchemaWrapper) { - taosMemoryFree(((SSchemaWrapper*)pSchemaWrapper)->pSchema); - taosMemoryFree(pSchemaWrapper); + if (pSchemaWrapper != NULL && *(SSchemaWrapper**)pSchemaWrapper != NULL) { + taosMemoryFree((*(SSchemaWrapper**)pSchemaWrapper)->pSchema); + taosMemoryFree(*(SSchemaWrapper**)pSchemaWrapper); } }