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) if (!profileMgr)
return; return;
PRUnichar *name; nsXPIDLString name;
rv = profileMgr->GetCurrentProfile(&name); rv = profileMgr->GetCurrentProfile(getter_Copies(name));
if (!name) if (NS_SUCCEEDED(rv))
return; LossyCopyUTF16toASCII(name, aProfile);
LossyCopyUTF16toASCII(name, aProfile);
} }
NS_GENERIC_FACTORY_CONSTRUCTOR(XRemoteService) NS_GENERIC_FACTORY_CONSTRUCTOR(XRemoteService)