PYTHON-1554 Fix datetime decoding memory leak
This commit is contained in:
parent
cac0d5548f
commit
5ff33a2a37
@ -2120,6 +2120,7 @@ static PyObject* get_value(PyObject* self, PyObject* name, const char* buffer,
|
||||
/* convert to local time */
|
||||
if (options->tzinfo != Py_None) {
|
||||
astimezone = PyObject_GetAttrString(value, "astimezone");
|
||||
Py_DECREF(value);
|
||||
if (!astimezone) {
|
||||
Py_DECREF(replace);
|
||||
Py_DECREF(args);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user