Bug 202198: fix possible leak in nsScriptSecurityManager::InitPrefs(), patch by Ryan Jones <sciguyryan+bugzilla@gmail.com>, r+sr=dveditz

This commit is contained in:
gavin%gavinsharp.com 2006-11-22 17:22:40 +00:00
Родитель 1d8b18a3b9
Коммит ad22de3c0c
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -3658,8 +3658,8 @@ nsScriptSecurityManager::InitPrefs()
if (NS_SUCCEEDED(rv) && prefCount > 0) if (NS_SUCCEEDED(rv) && prefCount > 0)
{ {
rv = InitPrincipals(prefCount, (const char**)prefNames, mSecurityPref); rv = InitPrincipals(prefCount, (const char**)prefNames, mSecurityPref);
NS_ENSURE_SUCCESS(rv, rv);
NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(prefCount, prefNames); NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(prefCount, prefNames);
NS_ENSURE_SUCCESS(rv, rv);
} }
//-- Set a callback for principal changes //-- Set a callback for principal changes
prefBranchInternal->AddObserver(sPrincipalPrefix, this, PR_FALSE); prefBranchInternal->AddObserver(sPrincipalPrefix, this, PR_FALSE);