commit | ff27d6b747b880508cd03aff139419950567c863 | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@haypocalc.com> | Sat Mar 13 00:57:22 2010 +0000 |
committer | Victor Stinner <victor.stinner@haypocalc.com> | Sat Mar 13 00:57:22 2010 +0000 |
tree | 40bec11a476a641e2804e157d899f5ffa4124f05 | |
parent | 0d85e412b407e89a34c434dae557428bd0b9306b [diff] |
sqlite3: Fix _PyUnicode_AsStringAndSize() error handler. Destroy begin_statement (not statement) on error.
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 @@ statement = _PyUnicode_AsStringAndSize(begin_statement, &size); if (!statement) { - Py_DECREF(statement); + Py_DECREF(begin_statement); return -1; } self->begin_statement = PyMem_Malloc(size + 2);