fix:[TD-31558] Handle error of tDecodeSSchemaWrapper.

This commit is contained in:
sima 2024-08-20 14:12:30 +08:00
parent dcd8af8dae
commit 7759e6aea4
1 changed files with 5 additions and 1 deletions

View File

@ -694,9 +694,13 @@ int32_t metaGetTbTSchemaEx(SMeta *pMeta, tb_uid_t suid, tb_uid_t uid, int32_t sv
SSchemaWrapper *pSchemaWrapper = &schema;
tDecoderInit(&dc, pData, nData);
(void)tDecodeSSchemaWrapper(&dc, pSchemaWrapper);
code = tDecodeSSchemaWrapper(&dc, pSchemaWrapper);
tDecoderClear(&dc);
tdbFree(pData);
if (TSDB_CODE_SUCCESS != code) {
taosMemoryFree(pSchemaWrapper->pSchema);
goto _exit;
}
// convert
STSchema *pTSchema = tBuildTSchema(pSchemaWrapper->pSchema, pSchemaWrapper->nCols, pSchemaWrapper->version);