fix invalid free
This commit is contained in:
parent
d6f6c77590
commit
ec35f5718e
|
@ -512,6 +512,7 @@ int32_t getTableInfoFromSnapshot(SSnapContext* ctx, void** pBuf, int32_t* contLe
|
||||||
req.schemaTag = me.stbEntry.schemaTag;
|
req.schemaTag = me.stbEntry.schemaTag;
|
||||||
req.schemaRow.version = 1;
|
req.schemaRow.version = 1;
|
||||||
req.schemaTag.version = 1;
|
req.schemaTag.version = 1;
|
||||||
|
req.colCmpr = me.colCmpr;
|
||||||
|
|
||||||
ret = buildSuperTableInfo(&req, pBuf, contLen);
|
ret = buildSuperTableInfo(&req, pBuf, contLen);
|
||||||
*type = TDMT_VND_CREATE_STB;
|
*type = TDMT_VND_CREATE_STB;
|
||||||
|
@ -587,6 +588,7 @@ int32_t getTableInfoFromSnapshot(SSnapContext* ctx, void** pBuf, int32_t* contLe
|
||||||
req.uid = me.uid;
|
req.uid = me.uid;
|
||||||
req.commentLen = -1;
|
req.commentLen = -1;
|
||||||
req.ntb.schemaRow = me.ntbEntry.schemaRow;
|
req.ntb.schemaRow = me.ntbEntry.schemaRow;
|
||||||
|
req.colCmpr = me.colCmpr;
|
||||||
ret = buildNormalChildTableInfo(&req, pBuf, contLen);
|
ret = buildNormalChildTableInfo(&req, pBuf, contLen);
|
||||||
*type = TDMT_VND_CREATE_TABLE;
|
*type = TDMT_VND_CREATE_TABLE;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -472,7 +472,8 @@ int32_t cloneTableMeta(STableMeta* pSrc, STableMeta** pDst) {
|
||||||
return TSDB_CODE_OUT_OF_MEMORY;
|
return TSDB_CODE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
memcpy(*pDst, pSrc, metaSize);
|
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);
|
(*pDst)->schemaExt = (SSchemaExt*)((char*)*pDst + metaSize);
|
||||||
memcpy((*pDst)->schemaExt, pSrc->schemaExt, schemaExtSize);
|
memcpy((*pDst)->schemaExt, pSrc->schemaExt, schemaExtSize);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue