Free the global ALSA config after opening capture devices too

This commit is contained in:
Chris Robinson
2012-09-02 14:26:46 -07:00
parent a6f9ede849
commit 2b5fdad2c8
+4 -1
View File
@@ -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)
{