mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-44304: Ensure the sqlite3 destructor callback is always called with the GIL held (GH-26551) (GH_26552)
(cherry picked from commit 6e3b7cf3af
)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
parent
ad2f3b74b5
commit
317e9ed436
2 changed files with 7 additions and 0 deletions
|
@ -398,7 +398,9 @@ stmt_dealloc(pysqlite_Statement *self)
|
|||
PyObject_ClearWeakRefs((PyObject*)self);
|
||||
}
|
||||
if (self->st) {
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
sqlite3_finalize(self->st);
|
||||
Py_END_ALLOW_THREADS
|
||||
self->st = 0;
|
||||
}
|
||||
tp->tp_clear((PyObject *)self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue