Don't PR_DELETE() an uninitialized pointer.
git-svn-id: svn://10.0.0.236/trunk@32313 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
dfd13a3ca2
commit
34cd29be6b
@ -565,7 +565,7 @@ NS_IMETHODIMP nsProfile::GetCurrentProfileDir(nsFileSpec* profileDir)
|
||||
#if defined(DEBUG_profile)
|
||||
printf("ProfileManager : GetCurrentProfileDir\n");
|
||||
#endif
|
||||
char *profileName;
|
||||
char *profileName = nsnull;
|
||||
|
||||
rv = GetCurrentProfile(&profileName);
|
||||
|
||||
@ -589,7 +589,9 @@ NS_IMETHODIMP nsProfile::GetCurrentProfileDir(nsFileSpec* profileDir)
|
||||
}
|
||||
|
||||
|
||||
PR_DELETE(profileName);
|
||||
if (profileName) {
|
||||
PR_DELETE(profileName);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user