]> granicus.if.org Git - python/commitdiff
Backport 51669: Make sure memory is properly cleaned up in file_init (even though...
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 5 Sep 2006 04:32:06 +0000 (04:32 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 5 Sep 2006 04:32:06 +0000 (04:32 +0000)
Objects/fileobject.c

index 5249f1cdc0d0853f457d8db7976ebeb7d7521823..b43bf85b87273b4f901ed8a5c46298c23e3ecfef 100644 (file)
@@ -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)