Bug 251267 - Memory leak in XRemoteService.cpp.

r/sr=blizzard@mozilla.org
This commit is contained in:
pkw%us.ibm.com 2004-07-15 20:49:04 +00:00
parent 3c166e0c6e
commit 714333c300

View File

@ -1067,12 +1067,10 @@ XRemoteService::GetProfileName(nsACString &aProfile)
if (!profileMgr)
return;
PRUnichar *name;
rv = profileMgr->GetCurrentProfile(&name);
if (!name)
return;
LossyCopyUTF16toASCII(name, aProfile);
nsXPIDLString name;
rv = profileMgr->GetCurrentProfile(getter_Copies(name));
if (NS_SUCCEEDED(rv))
LossyCopyUTF16toASCII(name, aProfile);
}
NS_GENERIC_FACTORY_CONSTRUCTOR(XRemoteService)