fix build bustage - use comptr to delete obj

git-svn-id: svn://10.0.0.236/trunk@172637 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ben%bengoodger.com
2005-04-23 02:08:12 +00:00
parent dea0b13aee
commit 60ac6ac557

View File

@@ -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();