Fix SF #789402, Memory leak on open()
If opening a directory, the exception would leak.
This commit is contained in:
parent
c8cb5d9d69
commit
98cad48171
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue