From aeecfdfb3a76dbff06262b3b07cb686123d145f9 Mon Sep 17 00:00:00 2001 From: "bryner%brianryner.com" Date: Thu, 1 Apr 2004 23:13:25 +0000 Subject: [PATCH] Fixing hpux bustage. r=dbaron. --- xpcom/io/nsLocalFileUnix.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp index 77705d22e3c..d1515e489eb 100644 --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/xpcom/io/nsLocalFileUnix.cpp @@ -745,10 +745,12 @@ nsLocalFile::CopyToNative(nsIFile *newParent, const nsACString &newName) #endif // actually create the file. - nsCOMPtr newFile = new nsLocalFile(); + nsLocalFile *newFile = new nsLocalFile(); if (!newFile) return NS_ERROR_OUT_OF_MEMORY; + nsCOMPtr fileRef(newFile); // release on exit + rv = newFile->InitWithNativePath(newPathName); if (NS_FAILED(rv)) return rv;