Bug 1204610 - Use a smart pointer in nsNullPrincipalURI. r=mrbkap

This commit is contained in:
Andrew McCreight 2015-09-14 12:43:00 +02:00
parent 34214244b4
commit 9df9a5eded

View File

@ -274,12 +274,11 @@ NS_IMETHODIMP
nsNullPrincipalURI::Equals(nsIURI *aOther, bool *_equals)
{
*_equals = false;
nsNullPrincipalURI *otherURI;
nsRefPtr<nsNullPrincipalURI> otherURI;
nsresult rv = aOther->QueryInterface(kNullPrincipalURIImplementationCID,
(void **)&otherURI);
getter_AddRefs(otherURI));
if (NS_SUCCEEDED(rv)) {
*_equals = mPath == otherURI->mPath;
NS_RELEASE(otherURI);
}
return NS_OK;
}