summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaarten Bosmans <mkbosmans@gmail.com>2011-01-12 08:15:44 +0100
committerMaarten Bosmans <mkbosmans@gmail.com>2011-02-17 11:58:21 +0100
commit8d12ab9e632420864fa024909c66863de2452987 (patch)
tree0699ca29dcd8554cde1e14535c188d007629b889
parent051d82133f0ae6a57bf66fd200bc8e3591a7d5ca (diff)
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.
-rw-r--r--src/pulsecore/core-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 4e7d0d71..ec0b338d 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) {