From: Neal Norwitz Date: Tue, 5 Sep 2006 04:32:06 +0000 (+0000) Subject: Backport 51669: Make sure memory is properly cleaned up in file_init (even though... X-Git-Tag: v2.5c2~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe50f8e9618746fdd7635567d60e6f48e1744dba;p=python 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) --- diff --git a/Objects/fileobject.c b/Objects/fileobject.c index 5249f1cdc0..b43bf85b87 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)