Mercurial > cpython-lru_cache-weakref
diff Modules/_sqlite/cursor.c @ 46195:51eff2fd9527
Moved DECREF to correct place to get rid of leaked references.
| author | Gerhard Häring <gh@ghaering.de> |
|---|---|
| date | Sat, 29 Mar 2008 14:11:55 +0000 |
| parents | e06e08e8fdce |
| children | 031dfe455585 |
line wrap: on
line diff
--- a/Modules/_sqlite/cursor.c Sat Mar 29 05:06:52 2008 +0000 +++ b/Modules/_sqlite/cursor.c Sat Mar 29 14:11:55 2008 +0000 @@ -355,9 +355,9 @@ error_obj = PyUnicode_FromEncodedObject(buf_bytes, "ascii", "replace"); if (!error_obj) { PyErr_SetString(pysqlite_OperationalError, "Could not decode to UTF-8"); - Py_DECREF(error_obj); } else { PyErr_SetObject(pysqlite_OperationalError, error_obj); + Py_DECREF(error_obj); } Py_DECREF(buf_bytes); }
