summaryrefslogtreecommitdiffstats
path: root/Modules/datetimemodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-08-10 19:26:04 (GMT)
committerGuido van Rossum <guido@python.org>2007-08-10 19:26:04 (GMT)
commite9fb515d4679f5534d95cc7e277e796b4a25c0d4 (patch)
treeef1df79b95162656f525ea0a6c495681fd7dfc28 /Modules/datetimemodule.c
parente6b59c5550227505dfc787ebec605e51e50a6e46 (diff)
downloadcpython-e9fb515d4679f5534d95cc7e277e796b4a25c0d4.zip
cpython-e9fb515d4679f5534d95cc7e277e796b4a25c0d4.tar.gz
cpython-e9fb515d4679f5534d95cc7e277e796b4a25c0d4.tar.bz2
Fix refcount bug in make_Zreplacement().
Diffstat (limited to 'Modules/datetimemodule.c')
-rw-r--r--Modules/datetimemodule.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/datetimemodule.c b/Modules/datetimemodule.c
index 61bba86..d220b56 100644
--- a/Modules/datetimemodule.c
+++ b/Modules/datetimemodule.c
@@ -1159,6 +1159,7 @@ make_Zreplacement(PyObject *object, PyObject *tzinfoarg)
Zreplacement, NULL);
if (Zreplacement == NULL)
return NULL;
+ Py_INCREF(Zreplacement);
}
if (!PyString_Check(Zreplacement)) {
PyErr_SetString(PyExc_TypeError,