提交 70b89bec 编写于 作者: H Hongze Cheng

more fix

上级 04801585
......@@ -39,7 +39,7 @@ static int32_t tsdbOpenFile(const char *path, int32_t szPage, int32_t flag, STsd
}
pFD->szPage = szPage;
pFD->pgno = 0;
pFD->pBuf = taosMemoryMalloc(szPage);
pFD->pBuf = taosMemoryCalloc(1, szPage);
if (pFD->pBuf == NULL) {
code = TSDB_CODE_OUT_OF_MEMORY;
taosMemoryFree(pFD);
......@@ -84,7 +84,7 @@ static int32_t tsdbWriteFilePage(STsdbFD *pFD) {
}
if (pFD->szFile < pFD->pgno) {
pFD->szFile = pFD->szFile;
pFD->szFile = pFD->pgno;
}
}
pFD->pgno = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册