mirror of
https://github.com/python/cpython.git
synced 2025-12-10 11:00:14 +00:00
Fix refcount bug in make_Zreplacement().
This commit is contained in:
parent
e6b59c5550
commit
e9fb515d46
1 changed files with 1 additions and 0 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue