From 2b5fdad2c8370159cee9e4318983610e1086cf65 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 2 Sep 2012 14:26:46 -0700 Subject: Free the global ALSA config after opening capture devices too --- Alc/backends/alsa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Alc/backends') diff --git a/Alc/backends/alsa.c b/Alc/backends/alsa.c index c5b85b81..d43285ad 100644 --- a/Alc/backends/alsa.c +++ b/Alc/backends/alsa.c @@ -672,7 +672,7 @@ static ALCenum alsa_open_playback(ALCdevice *device, const ALCchar *deviceName) return ALC_OUT_OF_MEMORY; } - // Free alsa's global config tree. Otherwise valgrind reports a ton of leaks. + /* Free alsa's global config tree. Otherwise valgrind reports a ton of leaks. */ snd_config_update_free_global(); device->DeviceName = strdup(deviceName); @@ -955,6 +955,9 @@ static ALCenum alsa_open_capture(ALCdevice *Device, const ALCchar *deviceName) return ALC_INVALID_VALUE; } + /* Free alsa's global config tree. Otherwise valgrind reports a ton of leaks. */ + snd_config_update_free_global(); + format = -1; switch(Device->FmtType) { -- cgit v1.2.3