[issue9422] Memory leak when reinitializing a Struct object

Winston451 report at bugs.python.org
Thu Jul 29 22:33:35 CEST 2010


New submission from Winston451 <montag451 at laposte.net>:

The s_init function of the _struct.c file does not free the s_codes field before storing a new address into it. So when a Struct object is reinitialized the memory block pointed to by s_codes is lost. The file attached with the bug report shows a code which reproduce the problem.

----------
components: Library (Lib)
files: leak.py
messages: 111995
nosy: Winston451
priority: normal
severity: normal
status: open
title: Memory leak when reinitializing a Struct object
type: resource usage
versions: Python 2.6
Added file: http://bugs.python.org/file18262/leak.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9422>
_______________________________________


More information about the Python-bugs-list mailing list