From e9fb515d4679f5534d95cc7e277e796b4a25c0d4 Mon Sep 17 00:00:00 2001
From: Guido van Rossum <guido@python.org>
Date: Fri, 10 Aug 2007 19:26:04 +0000
Subject: Fix refcount bug in make_Zreplacement().

---
 Modules/datetimemodule.c | 1 +
 1 file changed, 1 insertion(+)

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,
-- 
cgit v0.12

