From cc5b3af019db3893c84e4f09fef4277727151a84 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Sat, 26 Jun 2010 12:11:08 +0200 Subject: [PATCH] alsa: fix a memory leak. The thread can be canceled when owning a block_t, so we must push a way to clean it up. --- modules/audio_output/alsa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c index ffb1c80e77..b5168d2f1f 100644 --- a/modules/audio_output/alsa.c +++ b/modules/audio_output/alsa.c @@ -867,6 +867,7 @@ static void ALSAFill( aout_instance_t * p_aout ) if( p_buffer == NULL ) goto error; + block_cleanup_push( p_buffer ); for (;;) { int n = snd_pcm_poll_descriptors_count(p_pcm); @@ -912,7 +913,7 @@ static void ALSAFill( aout_instance_t * p_aout ) msg_Err( p_aout, "cannot write: %s", snd_strerror( i_snd_rc ) ); vlc_restorecancel(canc); - block_Release( p_buffer ); + vlc_cleanup_run(); return; error: -- 2.11.4.GIT