Kaydet (Commit) ff27d6b7 authored tarafından Victor Stinner's avatar Victor Stinner

sqlite3: Fix _PyUnicode_AsStringAndSize() error handler.

Destroy begin_statement (not statement) on error.
üst 0d85e412
...@@ -1087,7 +1087,7 @@ static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, Py ...@@ -1087,7 +1087,7 @@ static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, Py
statement = _PyUnicode_AsStringAndSize(begin_statement, &size); statement = _PyUnicode_AsStringAndSize(begin_statement, &size);
if (!statement) { if (!statement) {
Py_DECREF(statement); Py_DECREF(begin_statement);
return -1; return -1;
} }
self->begin_statement = PyMem_Malloc(size + 2); self->begin_statement = PyMem_Malloc(size + 2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment