From: Guido van Rossum Date: Fri, 10 Aug 2007 19:26:04 +0000 (+0000) Subject: Fix refcount bug in make_Zreplacement(). X-Git-Tag: v3.0a1~459 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9fb515d4679f5534d95cc7e277e796b4a25c0d4;p=thirdparty%2FPython%2Fcpython.git Fix refcount bug in make_Zreplacement(). --- diff --git a/Modules/datetimemodule.c b/Modules/datetimemodule.c index 61bba86b0295..d220b563c881 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,