Title: memory leak in PyModule_Create2
Type: resource usage Stage: resolved
Components: Versions: Python 3.2, Python 3.3
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: meador.inge Nosy List: jcea, jll, meador.inge, python-dev
Priority: normal Keywords: patch

Created on 2012-07-19 13:24 by jll, last changed 2012-07-19 19:07 by jcea. This issue is now closed.

File name Uploaded Description Edit
moduleobject.patch jll, 2012-07-19 13:24 patch on objects/moduleobject.c review
Messages (4)
msg165838 - (view) Author: Julia Lawall (jll) * Date: 2012-07-19 13:24
In objects/moduleobject.c, in the function PyModule_Create2, it appears that m should be decrefed on all of the failure paths between its allocation and the return from the function.
msg165843 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2012-07-19 15:02
This looks OK to me (I don't see a way to write a test case to cover the leak).  I will commit later today unless I hear some objections.
msg165853 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-07-19 18:52
New changeset 7140d97d36fd by Meador Inge in branch '3.2':
Issue #15394: Fix ref leaks in PyModule_Create.

New changeset 571777bf5527 by Meador Inge in branch 'default':
Issue #15394: Fix ref leaks in PyModule_Create.
msg165854 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2012-07-19 18:55
Thanks for the patch Julia!
Date User Action Args
2012-07-19 19:07:44jceasetnosy: + jcea
2012-07-19 18:55:28meador.ingesetstatus: open -> closed
resolution: fixed
messages: + msg165854

stage: commit review -> resolved
2012-07-19 18:52:41python-devsetnosy: + python-dev
messages: + msg165853
2012-07-19 15:02:35meador.ingesetversions: + Python 3.3
nosy: + meador.inge

messages: + msg165843

assignee: meador.inge
stage: commit review
2012-07-19 13:24:56jllcreate