fix invalid free

This commit is contained in:
yihaoDeng 2024-04-01 19:58:04 +08:00
parent d6f6c77590
commit ec35f5718e
2 changed files with 4 additions and 1 deletions

View File

@ -512,6 +512,7 @@ int32_t getTableInfoFromSnapshot(SSnapContext* ctx, void** pBuf, int32_t* contLe
req.schemaTag = me.stbEntry.schemaTag;
req.schemaRow.version = 1;
req.schemaTag.version = 1;
req.colCmpr = me.colCmpr;
ret = buildSuperTableInfo(&req, pBuf, contLen);
*type = TDMT_VND_CREATE_STB;
@ -587,6 +588,7 @@ int32_t getTableInfoFromSnapshot(SSnapContext* ctx, void** pBuf, int32_t* contLe
req.uid = me.uid;
req.commentLen = -1;
req.ntb.schemaRow = me.ntbEntry.schemaRow;
req.colCmpr = me.colCmpr;
ret = buildNormalChildTableInfo(&req, pBuf, contLen);
*type = TDMT_VND_CREATE_TABLE;
} else {

View File

@ -472,7 +472,8 @@ int32_t cloneTableMeta(STableMeta* pSrc, STableMeta** pDst) {
return TSDB_CODE_OUT_OF_MEMORY;
}
memcpy(*pDst, pSrc, metaSize);
if (useCompress(pSrc->tableType) && pSrc->schemaExt ) {
if (useCompress(pSrc->tableType) /* && pSrc->schemaExt*/) {
ASSERT(pSrc->schemaExt == NULL);
(*pDst)->schemaExt = (SSchemaExt*)((char*)*pDst + metaSize);
memcpy((*pDst)->schemaExt, pSrc->schemaExt, schemaExtSize);
} else {