lad_dealloc(): if xp->x_fd == -1, it means the descriptor's already
been closed. Don't try to reclose it. Found by Insure.
This commit is contained in:
parent
152fbe88e9
commit
4ddd8202bc
|
@ -110,7 +110,9 @@ newladobject(PyObject *arg)
|
|||
static void
|
||||
lad_dealloc(lad_t *xp)
|
||||
{
|
||||
close(xp->x_fd);
|
||||
/* if already closed, don't reclose it */
|
||||
if (xp->x_fd != -1)
|
||||
close(xp->x_fd);
|
||||
PyObject_Del(xp);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue