summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/file/_Filemodule.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-05-28 21:57:35 (GMT)
committerGeorg Brandl <georg@python.org>2006-05-28 21:57:35 (GMT)
commit5f6861df9300f455d600b6cd237faf429d9a06b0 (patch)
tree1d4623b3dcd8c38658883f1318d84d6aa66f401b /Mac/Modules/file/_Filemodule.c
parentc26025c562c85cac07470b832215f5f1e474aa56 (diff)
downloadcpython-5f6861df9300f455d600b6cd237faf429d9a06b0.zip
cpython-5f6861df9300f455d600b6cd237faf429d9a06b0.tar.gz
cpython-5f6861df9300f455d600b6cd237faf429d9a06b0.tar.bz2
Correct None refcount issue in Mac modules. (Are they
still used?)
Diffstat (limited to 'Mac/Modules/file/_Filemodule.c')
-rw-r--r--Mac/Modules/file/_Filemodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Mac/Modules/file/_Filemodule.c b/Mac/Modules/file/_Filemodule.c
index c211de1..07bd341 100644
--- a/Mac/Modules/file/_Filemodule.c
+++ b/Mac/Modules/file/_Filemodule.c
@@ -153,7 +153,7 @@ typedef struct FSCatalogInfoObject {
static PyObject *FSCatalogInfo_New(FSCatalogInfo *itself)
{
FSCatalogInfoObject *it;
- if (itself == NULL) return Py_None;
+ if (itself == NULL) { Py_INCREF(Py_None); return Py_None; }
it = PyObject_NEW(FSCatalogInfoObject, &FSCatalogInfo_Type);
if (it == NULL) return NULL;
it->ob_itself = *itself;