[Python-checkins] r51734 - python/branches/release25-maint/Objects/fileobject.c

neal.norwitz python-checkins at python.org
Tue Sep 5 06:32:07 CEST 2006


Author: neal.norwitz
Date: Tue Sep  5 06:32:06 2006
New Revision: 51734

Modified:
   python/branches/release25-maint/Objects/fileobject.c
Log:
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)

Modified: python/branches/release25-maint/Objects/fileobject.c
==============================================================================
--- python/branches/release25-maint/Objects/fileobject.c	(original)
+++ python/branches/release25-maint/Objects/fileobject.c	Tue Sep  5 06:32:06 2006
@@ -2016,7 +2016,7 @@
                 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)


More information about the Python-checkins mailing list