[Python-checkins] CVS: python/dist/src/Modules linuxaudiodev.c,2.5,2.6
Barry Warsaw
python-dev@python.org
Thu, 17 Aug 2000 22:10:47 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv3312
Modified Files:
linuxaudiodev.c
Log Message:
lad_dealloc(): if xp->x_fd == -1, it means the descriptor's already
been closed. Don't try to reclose it. Found by Insure.
Index: linuxaudiodev.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/linuxaudiodev.c,v
retrieving revision 2.5
retrieving revision 2.6
diff -C2 -r2.5 -r2.6
*** linuxaudiodev.c 2000/07/21 06:00:07 2.5
--- linuxaudiodev.c 2000/08/18 05:10:45 2.6
***************
*** 111,115 ****
lad_dealloc(lad_t *xp)
{
! close(xp->x_fd);
PyObject_Del(xp);
}
--- 111,117 ----
lad_dealloc(lad_t *xp)
{
! /* if already closed, don't reclose it */
! if (xp->x_fd != -1)
! close(xp->x_fd);
PyObject_Del(xp);
}