cpython: 7140d97d36fd (original) (raw)

Mercurial > cpython

changeset 78178:7140d97d36fd 3.2

Issue #15394: Fix ref leaks in PyModule_Create. Patch by Julia Lawall. [#15394]

Meador Inge meadori@gmail.com
date Thu, 19 Jul 2012 13:45:43 -0500
parents 153ae76b963e
children 571777bf5527 b584c58c2286
files Misc/ACKS Misc/NEWS Objects/moduleobject.c
diffstat 3 files changed, 11 insertions(+), 1 deletions(-)[+] [-] Misc/ACKS 1 Misc/NEWS 3 Objects/moduleobject.c 8

line wrap: on

line diff

--- a/Misc/ACKS +++ b/Misc/ACKS @@ -542,6 +542,7 @@ Soren Larsen Piers Lauder Ben Laurie Simon Law +Julia Lawall Chris Lawrence Brian Leair James Lee

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ What's New in Python 3.2.4 Core and Builtins ----------------- +- Issue #15394: An issue in PyModule_Create that caused references to

--- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -117,8 +117,10 @@ PyModule_Create2(struct PyModuleDef* mod d = PyModule_GetDict((PyObject*)m); if (module->m_methods != NULL) { n = PyUnicode_FromString(name);

@@ -126,16 +128,19 @@ PyModule_Create2(struct PyModuleDef* mod "module functions cannot set" " METH_CLASS or METH_STATIC"); Py_DECREF(n);

@@ -146,6 +151,7 @@ PyModule_Create2(struct PyModuleDef* mod v = PyUnicode_FromString(module->m_doc); if (v == NULL || PyDict_SetItemString(d, "doc", v) != 0) { Py_XDECREF(v);