Fix double free in PSM. Bug#82359, r=javi@netscape.com,sr=blizzard@mozilla.org,a=blizzard@mozilla.org
git-svn-id: svn://10.0.0.236/trunk@96201 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -231,7 +231,7 @@ nsCertOutliner::GetCertAtIndex(PRInt32 index)
|
||||
dont_AddRef(mCertArray->ElementAt(certIndex));
|
||||
nsCOMPtr<nsIX509Cert> cert = do_QueryInterface(isupport);
|
||||
rawPtr = cert;
|
||||
NS_ADDREF(rawPtr);
|
||||
NS_IF_ADDREF(rawPtr);
|
||||
break;
|
||||
}
|
||||
if (mOutlinerArray[i].open)
|
||||
|
||||
@@ -231,7 +231,7 @@ nsCertOutliner::GetCertAtIndex(PRInt32 index)
|
||||
dont_AddRef(mCertArray->ElementAt(certIndex));
|
||||
nsCOMPtr<nsIX509Cert> cert = do_QueryInterface(isupport);
|
||||
rawPtr = cert;
|
||||
NS_ADDREF(rawPtr);
|
||||
NS_IF_ADDREF(rawPtr);
|
||||
break;
|
||||
}
|
||||
if (mOutlinerArray[i].open)
|
||||
|
||||
@@ -149,22 +149,20 @@ nsNSSComponent::GetPIPNSSBundleString(const PRUnichar *name,
|
||||
nsString &outString)
|
||||
{
|
||||
PRUnichar *ptrv = nsnull;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
|
||||
outString.SetLength(0);
|
||||
if (mPIPNSSBundle && name) {
|
||||
nsresult rv = mPIPNSSBundle->GetStringFromName(name, &ptrv);
|
||||
rv = mPIPNSSBundle->GetStringFromName(name, &ptrv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
outString = ptrv;
|
||||
return NS_OK;
|
||||
} else {
|
||||
outString.SetLength(0);
|
||||
rv = NS_OK;
|
||||
}
|
||||
nsMemory::Free(ptrv);
|
||||
} else {
|
||||
outString.SetLength(0);
|
||||
}
|
||||
if (ptrv)
|
||||
nsMemory::Free(ptrv);
|
||||
|
||||
return NS_ERROR_FAILURE;
|
||||
return rv;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user