mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Clean up leaks
This commit is contained in:
parent
3bb7c6529c
commit
2c83b5f862
@ -985,6 +985,7 @@ nsWebShell::Init(nsNativeWidget aNativeParent,
|
||||
NS_WITH_SERVICE(nsIDocumentLoader, docLoaderService, kDocLoaderServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
||||
rv = docLoaderService->CreateDocumentLoader(&mDocLoader);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
@ -3715,10 +3716,10 @@ nsresult nsWebShell::CheckForTrailingSlash(nsIURI* aURL)
|
||||
// Replace the top most history entry with the new url
|
||||
mSHist->SetURLForIndex(curIndex, newURL->GetUnicode());
|
||||
}
|
||||
else {
|
||||
delete newURL;
|
||||
delete historyURL;
|
||||
}
|
||||
|
||||
if (newURL) delete newURL;
|
||||
if (historyURL) delete historyURL;
|
||||
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -985,6 +985,7 @@ nsWebShell::Init(nsNativeWidget aNativeParent,
|
||||
NS_WITH_SERVICE(nsIDocumentLoader, docLoaderService, kDocLoaderServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
|
||||
rv = docLoaderService->CreateDocumentLoader(&mDocLoader);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
@ -3715,10 +3716,10 @@ nsresult nsWebShell::CheckForTrailingSlash(nsIURI* aURL)
|
||||
// Replace the top most history entry with the new url
|
||||
mSHist->SetURLForIndex(curIndex, newURL->GetUnicode());
|
||||
}
|
||||
else {
|
||||
delete newURL;
|
||||
delete historyURL;
|
||||
}
|
||||
|
||||
if (newURL) delete newURL;
|
||||
if (historyURL) delete historyURL;
|
||||
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user