From 114486701aa1c4bc870a82c531aecf80442a83a6 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Fri, 9 Nov 2001 19:23:47 +0000 Subject: [PATCH] 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). --- Objects/fileobject.c | 1 - 1 file changed, 1 deletion(-) diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 9284185be6..b4f9e9b5c6 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 -- 2.50.1