A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-checkins/2010-July/095672.html below:

[Python-checkins] r83241 - in python/branches/release27-maint: Misc/NEWS Modules/_struct.c

[Python-checkins] r83241 - in python/branches/release27-maint: Misc/NEWS Modules/_struct.c [Python-checkins] r83241 - in python/branches/release27-maint: Misc/NEWS Modules/_struct.cmark.dickinson python-checkins at python.org
Thu Jul 29 23:44:47 CEST 2010
Author: mark.dickinson
Date: Thu Jul 29 23:44:47 2010
New Revision: 83241

Log:
Merged revisions 83239 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83239 | mark.dickinson | 2010-07-29 22:41:59 +0100 (Thu, 29 Jul 2010) | 2 lines
  
  Issue #9422:  Fix memory leak when re-initializing a struct.Struct object.
........


Modified:
   python/branches/release27-maint/   (props changed)
   python/branches/release27-maint/Misc/NEWS
   python/branches/release27-maint/Modules/_struct.c

Modified: python/branches/release27-maint/Misc/NEWS
==============================================================================
--- python/branches/release27-maint/Misc/NEWS	(original)
+++ python/branches/release27-maint/Misc/NEWS	Thu Jul 29 23:44:47 2010
@@ -64,6 +64,8 @@
 Extension Modules
 -----------------
 
+- Issue #9422: Fix memory leak when re-initializing a struct.Struct object.
+
 - Issue #7900: The getgroups(2) system call on MacOSX behaves rather oddly
   compared to other unix systems. In particular, os.getgroups() does
   not reflect any changes made using os.setgroups() but basicly always

Modified: python/branches/release27-maint/Modules/_struct.c
==============================================================================
--- python/branches/release27-maint/Modules/_struct.c	(original)
+++ python/branches/release27-maint/Modules/_struct.c	Thu Jul 29 23:44:47 2010
@@ -1289,6 +1289,9 @@
         PyErr_NoMemory();
         return -1;
     }
+    /* Free any s_codes value left over from a previous initialization. */
+    if (self->s_codes != NULL)
+        PyMem_FREE(self->s_codes);
     self->s_codes = codes;
 
     s = fmt;
More information about the Python-checkins mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4