Bug 410804 - nsWebBrowserPersist::MakeOutputStreamFromFile doesn't follow XPCOM rules. r=biesi, sr=biesi, a=schrep

This commit is contained in:
sdwilsh@shawnwilsher.com 2008-01-06 16:23:54 -08:00
parent 96aba0b23f
commit 8e7fe59222

View File

@ -2290,7 +2290,10 @@ nsWebBrowserPersist::MakeOutputStreamFromFile(
{
// Add to cleanup list in event of failure
CleanupData *cleanupData = new CleanupData;
NS_ENSURE_TRUE(cleanupData, NS_ERROR_OUT_OF_MEMORY);
if (!cleanupData) {
NS_RELEASE(*aOutputStream);
return NS_ERROR_OUT_OF_MEMORY;
}
cleanupData->mFile = aFile;
cleanupData->mIsDirectory = PR_FALSE;
mCleanupList.AppendElement(cleanupData);