Fixed free problem with getenv. Fixed leak for beos case. r=mcafee
git-svn-id: svn://10.0.0.236/trunk@56874 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -112,7 +112,6 @@ nsResProtocolHandler::Init()
|
||||
char* path = PR_GetEnv("MOZILLA_FIVE_HOME");
|
||||
if (path) {
|
||||
char* fileURL = PR_smprintf("file:///%s", path);
|
||||
PR_Free(path);
|
||||
rv = AppendSubstitution("Resource", fileURL);
|
||||
PR_Free(fileURL);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
@@ -170,6 +169,7 @@ nsResProtocolHandler::Init()
|
||||
char* fileURL = PR_smprintf("file:///%s", buf);
|
||||
rv = AppendSubstitution("Resource", fileURL);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
PR_Free(fileURL);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user