Kaydet (Commit) 4ddd8202 authored tarafından Barry Warsaw's avatar Barry Warsaw

lad_dealloc(): if xp->x_fd == -1, it means the descriptor's already

been closed.  Don't try to reclose it.  Found by Insure.
üst 152fbe88
......@@ -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);
}
......
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