mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Fixing Solaris memory problem, patch supplied by bruce@cybersight.com. a=mcmullen (6098)
This commit is contained in:
parent
da093b18b7
commit
e3575da7c5
@ -15,6 +15,7 @@
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
*/
|
||||
|
||||
#include "nsIProfile.h"
|
||||
#include "nsIPref.h"
|
||||
|
||||
@ -816,6 +817,7 @@ NS_IMETHODIMP nsProfile::SetProfileDir(const char *profileName, const nsFileSpec
|
||||
// Persistency
|
||||
nsPersistentFileDescriptor descriptor(profileDir);
|
||||
char* profileDirString = nsnull;
|
||||
profileDirString = nsCRT::strdup(profileDir.GetCString());
|
||||
nsOutputStringStream stream(profileDirString);
|
||||
stream << descriptor;
|
||||
|
||||
@ -844,7 +846,7 @@ NS_IMETHODIMP nsProfile::SetProfileDir(const char *profileName, const nsFileSpec
|
||||
printf("NULL value received for directory name.\n" );
|
||||
#endif
|
||||
}
|
||||
delete [] profileDirString;
|
||||
nsCRT::free(profileDirString);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user