Use setenv instead of putenv

In theory putenv could be used to handle freeing of strings yourself, but this
was not done in PulseAudio.  That leaves no advantages in using putenv.  With
setenv you're at the mercy of the implementation whether the strings leak, but
at least that is better then a certain leak, as it was before.
This commit is contained in:
Maarten Bosmans 2011-01-12 08:15:44 +01:00
parent 051d82133f
commit 8d12ab9e63

View file

@ -2501,7 +2501,7 @@ void pa_set_env(const char *key, const char *value) {
/* This is not thread-safe */
putenv(pa_sprintf_malloc("%s=%s", key, value));
setenv(key, value, 1);
}
void pa_set_env_and_record(const char *key, const char *value) {