Free the global ALSA config after opening capture devices too
This commit is contained in:
+4
-1
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user