From 55e9cbf26fc9b9fb5df87729706f18d2467d17aa Mon Sep 17 00:00:00 2001 From: "sfraser%netscape.com" Date: Tue, 15 May 2001 00:34:10 +0000 Subject: [PATCH] Fix the a problem exposed by another bug, where out params were not correctly set to null. Part of fix for bug 80722 (crash creating new profile). git-svn-id: svn://10.0.0.236/trunk@94909 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/io/nsLocalFileCommon.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mozilla/xpcom/io/nsLocalFileCommon.cpp b/mozilla/xpcom/io/nsLocalFileCommon.cpp index 20b18de6f27..cb207b6bf63 100644 --- a/mozilla/xpcom/io/nsLocalFileCommon.cpp +++ b/mozilla/xpcom/io/nsLocalFileCommon.cpp @@ -205,13 +205,13 @@ nsFSStringConversion::UCSToNewFS( const PRUnichar* aIn, char** aOut) res= mEncoder->GetMaxLength(aIn, inLength,&outLength); if(NS_SUCCEEDED(res)) { *aOut = (char*)nsMemory::Alloc(outLength+1); - if(nsnull != aOut) { + if(nsnull != *aOut) { res = mEncoder->Convert(aIn, &inLength, *aOut, &outLength); if(NS_SUCCEEDED(res)) { (*aOut)[outLength] = '\0'; } else { nsMemory::Free(*aOut); - aOut = nsnull; + *aOut = nsnull; } } else { res = NS_ERROR_OUT_OF_MEMORY; @@ -234,13 +234,13 @@ nsFSStringConversion::FSToNewUCS( const char* aIn, PRUnichar** aOut) res= mDecoder->GetMaxLength(aIn, inLength,&outLength); if(NS_SUCCEEDED(res)) { *aOut = (PRUnichar*)nsMemory::Alloc(2*(outLength+1)); - if(nsnull != aOut) { + if(nsnull != *aOut) { res = mDecoder->Convert(aIn, &inLength, *aOut, &outLength); if(NS_SUCCEEDED(res)) { (*aOut)[outLength] = '\0'; } else { nsMemory::Free(*aOut); - aOut = nsnull; + *aOut = nsnull; } } else { res = NS_ERROR_OUT_OF_MEMORY;