]> granicus.if.org Git - python/commitdiff
Merged revisions 74727 via svnmerge from
authorBenjamin Peterson <benjamin@python.org>
Wed, 9 Sep 2009 11:46:13 +0000 (11:46 +0000)
committerBenjamin Peterson <benjamin@python.org>
Wed, 9 Sep 2009 11:46:13 +0000 (11:46 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74727 | benjamin.peterson | 2009-09-08 18:04:22 -0500 (Tue, 08 Sep 2009) | 1 line

  #6865 fix ref counting in initialization of pwd module
........

Misc/NEWS
Modules/pwdmodule.c

index 0f4d90ee4632605b7b3ca5e39478c11ef28ed9be..d81de709981959f63dfeae4e215faaccb6f25944 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -778,6 +778,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #6865: Fix reference counting issue in the initialization of the pwd
+  module.
+
 - Issue #3741: DISTUTILS_USE_SDK set causes msvc9compiler.py to raise an
   exception.
 
index a271c5a82ebc5267f566bb6c161963afebc0ef10..2865dc6bf41fb2d8f480dfd292ad8c2559293f5b 100644 (file)
@@ -194,6 +194,7 @@ initpwd(void)
        Py_INCREF((PyObject *) &StructPwdType);
        PyModule_AddObject(m, "struct_passwd", (PyObject *) &StructPwdType);
        /* And for b/w compatibility (this was defined by mistake): */
+        Py_INCREF((PyObject *) &StructPwdType);
        PyModule_AddObject(m, "struct_pwent", (PyObject *) &StructPwdType);
        initialized = 1;
 }