mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
fixing freeing a non allocated ptr.
This commit is contained in:
parent
ba78e7bec4
commit
f7e3c0e981
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user