зеркало из https://github.com/mozilla/pjs.git
Approved by chofmann. This fixes a large leak over time. This allocation is not necessary (nor are many others in this file), as the code being called to fill the value is also allocating the memory, so the memory is/was getting allocated twice. This fixes bug #6926.
This commit is contained in:
Родитель
dc78c888ac
Коммит
6924cccf87
|
@ -497,7 +497,7 @@ NS_IMETHODIMP nsProfile::GetCurrentProfile(char **profileName)
|
|||
|
||||
if (NS_SUCCEEDED(rv))
|
||||
{
|
||||
*profileName = (char*) PR_Malloc(sizeof(char)*_MAX_LENGTH);
|
||||
// *profileName = (char*) PR_Malloc(sizeof(char)*_MAX_LENGTH);
|
||||
|
||||
rv = m_reg->GetString( key, "CurrentProfile", profileName );
|
||||
|
||||
|
@ -930,6 +930,7 @@ nsresult nsProfile::CopyRegKey(const char *oldProfile, const char *newProfile)
|
|||
char *entryName;
|
||||
char *entryValue;
|
||||
|
||||
// XXX: These allocations shouldn't be necessary.
|
||||
entryName = (char*) PR_Malloc(sizeof(char)*_MAX_LENGTH);
|
||||
entryValue = (char*) PR_Malloc(sizeof(char)*_MAX_LENGTH);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче