Comment 51 for bug 867424

Revision history for this message
In , Continuation (continuation) wrote :

I have no idea why this wouldn't show up before. I'm not an expert on PR_SetEnv, but all of the callers of SaveToEnv are passing in string constants, so it doesn't look to me that you actually need to do a strdup. The header for SetEnv just says that it has to be a "constant, persistent string", and passing in a string literal should be fine. A few call sites do that already. So maybe just inline SaveToEnv and remove the strdup.