зеркало из https://github.com/mozilla/gecko-dev.git
fix ref count leak of msgdb when marking local msgs read r=naving, sr=sspitzer a=asa 128910
This commit is contained in:
Родитель
4e4b80e712
Коммит
b5f916d0df
|
@ -713,7 +713,7 @@ nsresult nsMailDatabase::SetFolderInfoValid(nsFileSpec *folderName, int num, int
|
|||
|
||||
// should we have type safe downcast methods again?
|
||||
nsMailDatabase *pMessageDB = (nsMailDatabase *) nsMailDatabase::FindInCache(summaryPath);
|
||||
if (pMessageDB == NULL)
|
||||
if (pMessageDB == nsnull)
|
||||
{
|
||||
pMessageDB = new nsMailDatabase();
|
||||
if(!pMessageDB)
|
||||
|
@ -732,15 +732,12 @@ nsresult nsMailDatabase::SetFolderInfoValid(nsFileSpec *folderName, int num, int
|
|||
if (err != NS_OK)
|
||||
{
|
||||
delete pMessageDB;
|
||||
pMessageDB = NULL;
|
||||
pMessageDB = nsnull;
|
||||
}
|
||||
bOpenedDB = PR_TRUE;
|
||||
}
|
||||
else
|
||||
pMessageDB->AddRef();
|
||||
|
||||
|
||||
if (pMessageDB == NULL)
|
||||
if (pMessageDB == nsnull)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("Exception opening summary file\n");
|
||||
|
|
Загрузка…
Ссылка в новой задаче