mirror of
https://github.com/python/cpython
synced 2024-09-15 22:38:37 +00:00
Moved DECREF to correct place to get rid of leaked references.
This commit is contained in:
parent
ca67412f28
commit
e871ad59cf
|
@ -355,9 +355,9 @@ PyObject* _pysqlite_fetch_one_row(pysqlite_Cursor* self)
|
||||||
error_obj = PyUnicode_FromEncodedObject(buf_bytes, "ascii", "replace");
|
error_obj = PyUnicode_FromEncodedObject(buf_bytes, "ascii", "replace");
|
||||||
if (!error_obj) {
|
if (!error_obj) {
|
||||||
PyErr_SetString(pysqlite_OperationalError, "Could not decode to UTF-8");
|
PyErr_SetString(pysqlite_OperationalError, "Could not decode to UTF-8");
|
||||||
Py_DECREF(error_obj);
|
|
||||||
} else {
|
} else {
|
||||||
PyErr_SetObject(pysqlite_OperationalError, error_obj);
|
PyErr_SetObject(pysqlite_OperationalError, error_obj);
|
||||||
|
Py_DECREF(error_obj);
|
||||||
}
|
}
|
||||||
Py_DECREF(buf_bytes);
|
Py_DECREF(buf_bytes);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue