(215094) yes, ben, you are expected to free strings after they're allocated. Except in this case we don't need to do a string copy anymore now that we made the INI parser take a const char*, so just use .get() on the path we got earlier.

This commit is contained in:
ben%bengoodger.com 2004-02-29 22:03:47 +00:00
Родитель a4d5db04c6
Коммит fb012eb2a9
1 изменённых файлов: 1 добавлений и 5 удалений

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

@ -992,11 +992,7 @@ nsOperaProfileMigrator::CopySmartKeywords(nsIBookmarksService* aBMS,
nsCAutoString path; nsCAutoString path;
smartKeywords->GetNativePath(path); smartKeywords->GetNativePath(path);
char* pathCopy = ToNewCString(path); nsINIParser* parser = new nsINIParser(path.get());
if (!pathCopy)
return NS_ERROR_OUT_OF_MEMORY;
nsINIParser* parser = new nsINIParser(pathCopy);
if (!parser) if (!parser)
return NS_ERROR_OUT_OF_MEMORY; return NS_ERROR_OUT_OF_MEMORY;