From: RĂ©mi Duraffort Date: Sat, 26 Jun 2010 10:11:08 +0000 (+0200) Subject: alsa: fix a memory leak. X-Git-Tag: 1.2.0-pre1~6060 X-Git-Url: https://git.sesse.net/?p=vlc;a=commitdiff_plain;h=cc5b3af019db3893c84e4f09fef4277727151a84 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. --- 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: