mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
Cleanup dangling reference in get_timezone_utc_capi (#5317)
This commit is contained in:
parent
2812d3d992
commit
58dc03c737
1 changed files with 2 additions and 0 deletions
|
|
@ -2300,8 +2300,10 @@ get_timezone_utc_capi(PyObject* self, PyObject *args) {
|
|||
return NULL;
|
||||
}
|
||||
if (macro) {
|
||||
Py_INCREF(PyDateTime_TimeZone_UTC);
|
||||
return PyDateTime_TimeZone_UTC;
|
||||
} else {
|
||||
Py_INCREF(PyDateTimeAPI->TimeZone_UTC);
|
||||
return PyDateTimeAPI->TimeZone_UTC;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue