summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-09-05 04:32:06 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-09-05 04:32:06 (GMT)
commitfe50f8e9618746fdd7635567d60e6f48e1744dba (patch)
tree1e091cc3abcdba36c1fe9e433c3f4d6d244694d4 /Objects
parent3b3aae013b158114fdc90a72355d2d9b1b434875 (diff)
downloadcpython-fe50f8e9618746fdd7635567d60e6f48e1744dba.zip
cpython-fe50f8e9618746fdd7635567d60e6f48e1744dba.tar.gz
cpython-fe50f8e9618746fdd7635567d60e6f48e1744dba.tar.bz2
Backport 51669: Make sure memory is properly cleaned up in file_init (even though this should not be able to happen since we already parsed the args)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/fileobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 5249f1c..b43bf85 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -2016,7 +2016,7 @@ file_init(PyObject *self, PyObject *args, PyObject *kwds)
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|si:file",
kwlist, &o_name, &mode,
&bufsize))
- return -1;
+ goto Error;
if (fill_file_fields(foself, NULL, o_name, mode,
fclose) == NULL)