From: Maarten Bosmans Date: Wed, 12 Jan 2011 07:15:44 +0000 (+0100) Subject: Use setenv instead of putenv X-Git-Tag: submit/2.0-panda/20130828.192557~772^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d12ab9e632420864fa024909c66863de2452987;p=profile%2Fivi%2Fpulseaudio-panda.git 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. --- diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 4e7d0d7..ec0b338 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -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) {