Commit e9fb515d authored by Guido van Rossum's avatar Guido van Rossum

Fix refcount bug in make_Zreplacement().

parent e6b59c55
...@@ -1159,6 +1159,7 @@ make_Zreplacement(PyObject *object, PyObject *tzinfoarg) ...@@ -1159,6 +1159,7 @@ make_Zreplacement(PyObject *object, PyObject *tzinfoarg)
Zreplacement, NULL); Zreplacement, NULL);
if (Zreplacement == NULL) if (Zreplacement == NULL)
return NULL; return NULL;
Py_INCREF(Zreplacement);
} }
if (!PyString_Check(Zreplacement)) { if (!PyString_Check(Zreplacement)) {
PyErr_SetString(PyExc_TypeError, PyErr_SetString(PyExc_TypeError,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment