diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index bd657c9c3c0d327f40f98e60d03aa641daf7b513..e0351784ff9ea1f4bb76f0ef865abb89c7518fbe 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -6074,6 +6074,7 @@ int32_t setAlterTableInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { } if(pItem->pVar.nType != TSDB_DATA_TYPE_BINARY){ tscError("json type error, should be string"); + tdDestroyKVRowBuilder(&kvRowBuilder); return invalidOperationMsg(pMsg, msg25); } code = parseJsontoTagData(pItem->pVar.pz, &kvRowBuilder, pMsg, pTagsSchema->colId); @@ -7698,6 +7699,7 @@ int32_t doCheckForCreateFromStable(SSqlObj* pSql, SSqlInfo* pInfo) { tVariantListItem* pItem = taosArrayGet(pValList, 0); if(pItem->pVar.nType != TSDB_DATA_TYPE_BINARY){ tscError("json type error, should be string"); + tdDestroyKVRowBuilder(&kvRowBuilder); return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg6); } ret = parseJsontoTagData(pItem->pVar.pz, &kvRowBuilder, tscGetErrorMsgPayload(pCmd), pTagSchema[0].colId);