From 8d12ab9e632420864fa024909c66863de2452987 Mon Sep 17 00:00:00 2001 From: Maarten Bosmans Date: Wed, 12 Jan 2011 08:15:44 +0100 Subject: 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. --- src/pulsecore/core-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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) { -- cgit