diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-11-09 19:23:47 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-11-09 19:23:47 (GMT) |
commit | 114486701aa1c4bc870a82c531aecf80442a83a6 (patch) | |
tree | 631d234b31f392ddfd78deb5ff2edd204f58fadc /Objects/fileobject.c | |
parent | c010b6d9e0fe4a9c9c7c9f8379e913d3e77f8347 (diff) | |
download | cpython-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.c | 1 |
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 |