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
|
@ -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…
Reference in New Issue