Mercurial > cpython-lru_cache-weakref
diff Modules/_sqlite/connection.c @ 59555:c21b3e32ed7b
sqlite3: Fix _PyUnicode_AsStringAndSize() error handler.
Destroy begin_statement (not statement) on error.
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Sat, 13 Mar 2010 00:57:22 +0000 |
| parents | 3003c1656e2a |
| children | f40a80852480 |
line wrap: on
line diff
--- a/Modules/_sqlite/connection.c Sat Mar 13 00:39:49 2010 +0000 +++ b/Modules/_sqlite/connection.c Sat Mar 13 00:57:22 2010 +0000 @@ -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);
