[Python-3000-checkins] r62041 - python/branches/py3k/Modules/_sqlite/cursor.c
gerhard.haering
python-3000-checkins at python.org
Sat Mar 29 15:11:56 CET 2008
Author: gerhard.haering
Date: Sat Mar 29 15:11:55 2008
New Revision: 62041
Modified:
python/branches/py3k/Modules/_sqlite/cursor.c
Log:
Moved DECREF to correct place to get rid of leaked references.
Modified: python/branches/py3k/Modules/_sqlite/cursor.c
==============================================================================
--- python/branches/py3k/Modules/_sqlite/cursor.c (original)
+++ python/branches/py3k/Modules/_sqlite/cursor.c Sat Mar 29 15:11:55 2008
@@ -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);
}
More information about the Python-3000-checkins
mailing list