mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Merged revisions 78899 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r78899 | victor.stinner | 2010-03-13 04:28:34 +0100 (sam., 13 mars 2010) | 14 lines Merged revisions 78898 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78898 | victor.stinner | 2010-03-13 04:27:07 +0100 (sam., 13 mars 2010) | 7 lines sqlite3: Fix a segfault on calling a connection with something else than a string. Initialize all attributes to be able to call the statement destructor on error. Avoid also a duplicate connection in some tests: setUp() does already open a connection (":memory:"). ........ ................
This commit is contained in:
parent
8a685f7184
commit
09e4697ad1
2 changed files with 13 additions and 0 deletions
|
@ -979,6 +979,12 @@ PyObject* pysqlite_connection_call(pysqlite_Connection* self, PyObject* args, Py
|
|||
return NULL;
|
||||
}
|
||||
|
||||
statement->db = NULL;
|
||||
statement->st = NULL;
|
||||
statement->sql = NULL;
|
||||
statement->in_use = 0;
|
||||
statement->in_weakreflist = NULL;
|
||||
|
||||
rc = pysqlite_statement_create(statement, self, sql);
|
||||
|
||||
if (rc != SQLITE_OK) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue