зеркало из https://github.com/mozilla/pjs.git
Bug 235643 all _CreatePrintSettings leak on failure
patch by baafie@planet.nl r=timeless sr=bz a=asa
This commit is contained in:
Родитель
125e1cfc6a
Коммит
2cbd799e61
|
@ -62,9 +62,12 @@ nsPrintOptionsWin::~nsPrintOptionsWin()
|
|||
/* nsIPrintSettings CreatePrintSettings (); */
|
||||
nsresult nsPrintOptionsWin::_CreatePrintSettings(nsIPrintSettings **_retval)
|
||||
{
|
||||
*_retval = nsnull;
|
||||
nsPrintSettingsWin* printSettings = new nsPrintSettingsWin(); // does not initially ref count
|
||||
NS_ASSERTION(printSettings, "Can't be NULL!");
|
||||
NS_ENSURE_TRUE(printSettings, NS_ERROR_OUT_OF_MEMORY);
|
||||
|
||||
return printSettings->QueryInterface(NS_GET_IID(nsIPrintSettings), (void**)_retval); // ref counts
|
||||
NS_ADDREF(*_retval = printSettings); // ref count
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче