more fix
This commit is contained in:
parent
0480158500
commit
70b89becb9
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue