Fixed freeing wrong memory when the collation key creation fails, bug 119917, r=bhuvan, sr=sspitzer, a=dbaron.
git-svn-id: svn://10.0.0.236/trunk@112357 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -758,7 +758,7 @@ nsresult nsAbView::CreateCollationKey(const PRUnichar *aSource, PRUint8 **aKey,
|
||||
rv = mCollationKeyGenerator->CreateRawSortKey(kCollationCaseInSensitive, sourceString, *aKey, aKeyLen);
|
||||
if (NS_FAILED(rv))
|
||||
{
|
||||
nsMemory::Free(aKey);
|
||||
nsMemory::Free(*aKey);
|
||||
return rv;
|
||||
}
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user