PR_FREEIF(profileName);
if (profileName) { PR_DELETE(profileName); }
NS_IMETHODIMP nsProfile::GetCurrentProfileDir(nsFileSpec* profileDir){	nsresult rv = NS_OK;#if defined(DEBUG_profile)    printf("ProfileManager : GetCurrentProfileDir\n");#endif    char *profileName = nsnull;    rv = GetCurrentProfile(&profileName);	if (NS_SUCCEEDED(rv))	{	   	rv = GetProfileDir(profileName, profileDir);	    if (NS_FAILED(rv))		{#if defined(DEBUG_profile)	            printf("Couldn't get the profile dir.\n" );#endif	    }    }	else	{#if defined(DEBUG_profile)		    printf("Couldn't get the current profile.\n" );#endif	}    PR_FREEIF(profileName);    return rv;}