Kaydet (Commit) e871ad59 authored tarafından Gerhard Häring's avatar Gerhard Häring

Moved DECREF to correct place to get rid of leaked references.

üst ca67412f
...@@ -355,9 +355,9 @@ PyObject* _pysqlite_fetch_one_row(pysqlite_Cursor* self) ...@@ -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);
} }
......
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