[TD-3154]<hotfix>: fix invalid write

This commit is contained in:
Hongze Cheng 2021-03-03 14:00:38 +08:00
parent c79f1a2956
commit b6c2bbfee7
1 changed files with 1 additions and 1 deletions

View File

@ -597,7 +597,7 @@ int tsdbRestoreInfo(STsdbRepo *pRepo) {
// Get the data in row
ASSERT(pTable->lastRow == NULL);
STSchema *pSchema = tsdbGetTableSchema(pTable);
pTable->lastRow = taosTMalloc(schemaTLen(pSchema));
pTable->lastRow = taosTMalloc(dataRowMaxBytesFromSchema(pSchema));
if (pTable->lastRow == NULL) {
terrno = TSDB_CODE_TDB_OUT_OF_MEMORY;
tsdbDestroyReadH(&readh);