Commit 8f503c63 authored by gineera's avatar gineera

Alsa: Fix memory leak as nonMmapBuffers were not freed (since change to...

Alsa: Fix memory leak as nonMmapBuffers were not freed (since change to realloc).  Clean out corresponding dead code chunk.

git-svn-id: https://subversion.assembla.com/svn/portaudio/portaudio/trunk@1907 0f58301d-fd10-0410-b4af-bbb618454e57
parent 259fa4ac
......@@ -1898,8 +1898,8 @@ error:
static void PaAlsaStreamComponent_Terminate( PaAlsaStreamComponent *self )
{
alsa_snd_pcm_close( self->pcm );
if( self->userBuffers )
PaUtil_FreeMemory( self->userBuffers );
PaUtil_FreeMemory( self->userBuffers ); /* (Ptr can be NULL; PaUtil_FreeMemory includes a NULL check) */
PaUtil_FreeMemory( self->nonMmapBuffer );
}
/*
......@@ -3450,13 +3450,6 @@ static PaError PaAlsaStreamComponent_EndProcessing( PaAlsaStreamComponent *self,
if( self->canMmap )
res = alsa_snd_pcm_mmap_commit( self->pcm, self->offset, numFrames );
else
{
/* using realloc for optimisation
free( self->nonMmapBuffer );
self->nonMmapBuffer = NULL;
*/
}
if( res == -EPIPE || res == -ESTRPIPE )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment