Update of /cvsroot/alsa/alsa-lib/src/pcm In directory sc8-pr-cvs1:/tmp/cvs-serv22692
Modified Files: pcm_mmap.c Log Message: Adam Tla/lka <[EMAIL PROTECTED]> SHM memory leak fix Index: pcm_mmap.c =================================================================== RCS file: /cvsroot/alsa/alsa-lib/src/pcm/pcm_mmap.c,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- pcm_mmap.c 8 Aug 2003 09:06:41 -0000 1.68 +++ pcm_mmap.c 20 Jan 2004 12:47:05 -0000 1.69 @@ -462,11 +462,16 @@ if (i->u.shm.area) { snd_shm_area_destroy(i->u.shm.area); i->u.shm.area = NULL; - } else { - err = shmdt(i->addr); - if (err < 0) { - SYSERR("shmdt failed"); - return -errno; + if (pcm->access == SND_PCM_ACCESS_MMAP_INTERLEAVED || + pcm->access == SND_PCM_ACCESS_RW_INTERLEAVED) { + unsigned int c1; + for (c1 = c + 1; c1 < pcm->channels; c1++) { + snd_pcm_channel_info_t *i1 = &pcm->mmap_channels[c1]; + if (i1->u.shm.area) { + snd_shm_area_destroy(i1->u.shm.area); + i1->u.shm.area = NULL; + } + } } } break; ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog