mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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).
This commit is contained in:
parent
c010b6d9e0
commit
114486701a
1 changed files with 0 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue