Fix server crash when nvault is writting to journal file without write permission (bug 3231, r=Arkshine)
Former-commit-id: 6ad9e6bc8cf748bb06d5618cb21741d6e79b0110
This commit is contained in:
parent
bf395c8ac1
commit
15572e2d61
@ -129,7 +129,9 @@ bool Journal::Begin()
|
||||
|
||||
bool Journal::End()
|
||||
{
|
||||
if (m_fp)
|
||||
fclose(m_fp);
|
||||
|
||||
m_Bw.SetFilePtr(NULL);
|
||||
return true;
|
||||
}
|
||||
|
@ -266,8 +266,13 @@ bool NVault::Close()
|
||||
return false;
|
||||
|
||||
_SaveToFile();
|
||||
|
||||
if (m_Journal)
|
||||
{
|
||||
m_Journal->End();
|
||||
m_Journal->Erase();
|
||||
}
|
||||
|
||||
m_Open = false;
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user