Skip to content

Commit fe50f8e

Browse files
committed
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)
1 parent 3b3aae0 commit fe50f8e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/fileobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2016,7 +2016,7 @@ file_init(PyObject *self, PyObject *args, PyObject *kwds)
20162016
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|si:file",
20172017
kwlist, &o_name, &mode,
20182018
&bufsize))
2019-
return -1;
2019+
goto Error;
20202020

20212021
if (fill_file_fields(foself, NULL, o_name, mode,
20222022
fclose) == NULL)

0 commit comments

Comments
 (0)