sqlite3: Fix _PyUnicode_AsStringAndSize() error handler.

Destroy begin_statement (not statement) on error.
This commit is contained in:
Victor Stinner 2010-03-13 00:57:22 +00:00
parent 0d85e412b4
commit ff27d6b747
1 changed files with 1 additions and 1 deletions

View File

@ -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);