fix build bustage - use comptr to delete obj

This commit is contained in:
ben%bengoodger.com 2005-04-23 02:08:12 +00:00
Родитель 4827503bd9
Коммит c68bf62671
1 изменённых файлов: 3 добавлений и 4 удалений

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

@ -218,15 +218,14 @@ nsDirEnumeratorUnix::GetNextFile(nsIFile **_retval)
return NS_OK;
}
nsLocalFile* file = new nsLocalFile();
nsCOMPtr<nsILocalFile> file = new nsLocalFile();
if (!file)
return NS_ERROR_OUT_OF_MEMORY;
if (NS_FAILED(rv = file->InitWithNativePath(mParentPath)) ||
NS_FAILED(rv = file->AppendNative(nsDependentCString(mEntry->d_name)))) {
delete file;
NS_FAILED(rv = file->AppendNative(nsDependentCString(mEntry->d_name))))
return rv;
}
*_retval = file;
NS_ADDREF(*_retval);
return GetNextEntry();