aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-09-02 14:26:46 -0700
committerChris Robinson <[email protected]>2012-09-02 14:26:46 -0700
commit2b5fdad2c8370159cee9e4318983610e1086cf65 (patch)
treebab4c9c810a7b2cf27ac638365ff930aee873c8c /Alc/backends
parenta6f9ede84958a9d599a1bbff5ba2c0f01ce1678d (diff)
Free the global ALSA config after opening capture devices too
Diffstat (limited to 'Alc/backends')
-rw-r--r--Alc/backends/alsa.c5
1 files changed, 4 insertions, 1 deletions
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)
{