Fix SF #789402, Memory leak on open()

If opening a directory, the exception would leak.
This commit is contained in:
Neal Norwitz 2003-08-15 20:05:45 +00:00
parent c8cb5d9d69
commit 98cad48171
1 changed files with 1 additions and 0 deletions

View File

@ -99,6 +99,7 @@ dircheck(PyFileObject* f)
PyObject *exc = PyObject_CallFunction(PyExc_IOError, "(is)",
EISDIR, msg);
PyErr_SetObject(PyExc_IOError, exc);
Py_XDECREF(exc);
return NULL;
}
#endif