Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e871ad5

Browse files
committed
Moved DECREF to correct place to get rid of leaked references.
1 parent ca67412 commit e871ad5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_sqlite/cursor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,9 @@ PyObject* _pysqlite_fetch_one_row(pysqlite_Cursor* self)
355355
error_obj = PyUnicode_FromEncodedObject(buf_bytes, "ascii", "replace");
356356
if (!error_obj) {
357357
PyErr_SetString(pysqlite_OperationalError, "Could not decode to UTF-8");
358-
Py_DECREF(error_obj);
359358
} else {
360359
PyErr_SetObject(pysqlite_OperationalError, error_obj);
360+
Py_DECREF(error_obj);
361361
}
362362
Py_DECREF(buf_bytes);
363363
}

0 commit comments

Comments
 (0)