commit | 98cad48171dd760e2d05fde320e87dad42bd5399 | [log] [tgz] |
---|---|---|
author | Neal Norwitz <nnorwitz@gmail.com> | Fri Aug 15 20:05:45 2003 +0000 |
committer | Neal Norwitz <nnorwitz@gmail.com> | Fri Aug 15 20:05:45 2003 +0000 |
tree | 08c02fc5eb03200303fff01588ec463962119598 | |
parent | c8cb5d9d6950bb9e3b407c6b4a8dd2831f5edee9 [diff] [blame] |
Fix SF #789402, Memory leak on open() If opening a directory, the exception would leak.
diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 1cc6def..13354c8 100644 --- a/Objects/fileobject.c +++ b/Objects/fileobject.c
@@ -99,6 +99,7 @@ PyObject *exc = PyObject_CallFunction(PyExc_IOError, "(is)", EISDIR, msg); PyErr_SetObject(PyExc_IOError, exc); + Py_XDECREF(exc); return NULL; } #endif