fixing freeing a non allocated ptr.

This commit is contained in:
darin%netscape.com 2003-01-17 02:23:50 +00:00
parent ba78e7bec4
commit f7e3c0e981

View File

@ -271,10 +271,11 @@ nsGREDirServiceProvider::GetXPCOMPath()
{
char* grePath = GetGREDirectoryPath();
if (!grePath) {
grePath = PR_GetEnv("MOZILLA_FIVE_HOME");
if (!grePath) {
char* greEnv = PR_GetEnv("MOZILLA_FIVE_HOME");
if (!greEnv) {
return nsnull;
}
grePath = strdup(greEnv);
}
int len = strlen(grePath);