From 4981cc65c9fe5775ef7ad02f19a647f39150d5eb Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 26 May 2016 07:19:54 +0200 Subject: [PATCH] Try to call snd_config_update_free_global after every call to snd_pcm_close to prevent apparent memory leaks --- audio/drivers/alsa.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/audio/drivers/alsa.c b/audio/drivers/alsa.c index 2c875a22b4..bfea6221d3 100644 --- a/audio/drivers/alsa.c +++ b/audio/drivers/alsa.c @@ -156,7 +156,10 @@ error: if (alsa) { if (alsa->pcm) + { snd_pcm_close(alsa->pcm); + snd_config_update_free_global(); + } free(alsa); } @@ -298,7 +301,9 @@ static void alsa_free(void *data) { snd_pcm_drop(alsa->pcm); snd_pcm_close(alsa->pcm); + snd_config_update_free_global(); } + free(alsa); } }