summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-03-13 00:57:22 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-03-13 00:57:22 (GMT)
commitff27d6b747b880508cd03aff139419950567c863 (patch)
tree40bec11a476a641e2804e157d899f5ffa4124f05 /Modules
parent0d85e412b407e89a34c434dae557428bd0b9306b (diff)
downloadcpython-ff27d6b747b880508cd03aff139419950567c863.zip
cpython-ff27d6b747b880508cd03aff139419950567c863.tar.gz
cpython-ff27d6b747b880508cd03aff139419950567c863.tar.bz2
sqlite3: Fix _PyUnicode_AsStringAndSize() error handler.
Destroy begin_statement (not statement) on error.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_sqlite/connection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 5738e21..2ce27f5 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -1087,7 +1087,7 @@ static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, Py
statement = _PyUnicode_AsStringAndSize(begin_statement, &size);
if (!statement) {
- Py_DECREF(statement);
+ Py_DECREF(begin_statement);
return -1;
}
self->begin_statement = PyMem_Malloc(size + 2);