From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQ1CN-00067Z-Up for qemu-devel@nongnu.org; Thu, 03 May 2012 14:56:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SQ1CM-0000jy-5s for qemu-devel@nongnu.org; Thu, 03 May 2012 14:56:19 -0400 Received: from goliath.siemens.de ([192.35.17.28]:24644) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SQ1CL-0000jX-Rq for qemu-devel@nongnu.org; Thu, 03 May 2012 14:56:18 -0400 Message-ID: <4FA2D4C8.7010007@siemens.com> Date: Thu, 03 May 2012 15:56:08 -0300 From: Jan Kiszka MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 1.1] audio: Always call fini on exit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc , qemu-devel Not only clean up enabled voices but any registered one. Backends like pulsaudio rely on unconditional fini handler invocations. This fixes "Memory pool destroyed but not all memory blocks freed!" warnings on VM shutdowns when pa is used. Signed-off-by: Jan Kiszka --- audio/audio.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index bd9237e..4b6e06c 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1775,7 +1775,7 @@ static void audio_atexit (void) HWVoiceOut *hwo = NULL; HWVoiceIn *hwi = NULL; - while ((hwo = audio_pcm_hw_find_any_enabled_out (hwo))) { + while ((hwo = audio_pcm_hw_find_any_out (hwo))) { SWVoiceCap *sc; hwo->pcm_ops->ctl_out (hwo, VOICE_DISABLE); @@ -1791,7 +1791,7 @@ static void audio_atexit (void) } } - while ((hwi = audio_pcm_hw_find_any_enabled_in (hwi))) { + while ((hwi = audio_pcm_hw_find_any_in (hwi))) { hwi->pcm_ops->ctl_in (hwi, VOICE_DISABLE); hwi->pcm_ops->fini_in (hwi); } -- 1.7.3.4