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(); char* grePath = GetGREDirectoryPath();
if (!grePath) { if (!grePath) {
grePath = PR_GetEnv("MOZILLA_FIVE_HOME"); char* greEnv = PR_GetEnv("MOZILLA_FIVE_HOME");
if (!grePath) { if (!greEnv) {
return nsnull; return nsnull;
} }
grePath = strdup(greEnv);
} }
int len = strlen(grePath); int len = strlen(grePath);