Fixed a leak and incorrect copy of C string. Added nsXPIDLCString::operator =() to simplify usage.

This commit is contained in:
beard%netscape.com 1999-09-11 23:05:47 +00:00
Родитель 87f3477863
Коммит 2308a9ce73
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -590,8 +590,9 @@ NS_IMETHODIMP nsProfile::GetProfileDir(const char *profileName, nsFileSpec* prof
*profileDir = descriptor;
PR_FREEIF(encodedProfileDir);
orgProfileDir.Copy(profileDir->GetCString());
// nsXPIDLCString::operator =() now copies, and owns result.
orgProfileDir = profileDir->GetCString();
// Get the value of entry "migrated" to check the nature of the profile
m_reg->GetString( newKey, "migrated", &isMigrated);