summaryrefslogtreecommitdiffstats
path: root/Objects/fileobject.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-11-09 19:23:47 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-11-09 19:23:47 (GMT)
commit114486701aa1c4bc870a82c531aecf80442a83a6 (patch)
tree631d234b31f392ddfd78deb5ff2edd204f58fadc /Objects/fileobject.c
parentc010b6d9e0fe4a9c9c7c9f8379e913d3e77f8347 (diff)
downloadcpython-114486701aa1c4bc870a82c531aecf80442a83a6.zip
cpython-114486701aa1c4bc870a82c531aecf80442a83a6.tar.gz
cpython-114486701aa1c4bc870a82c531aecf80442a83a6.tar.bz2
open_the_file(): this routine has a borrowed reference to the file
object, so the "Metroworks only" section should not decref it in case of error (the caller is responsible for decref'ing in case of error -- and does).
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r--Objects/fileobject.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 9284185..b4f9e9b 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -123,7 +123,6 @@ open_the_file(PyFileObject *f, char *name, char *mode)
/* Metroworks only, not testable, so unchanged */
if (errno == 0) {
PyErr_SetString(PyExc_IOError, "Cannot open file");
- Py_DECREF(f);
return NULL;
}
#endif