mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
Fix memory leak
This commit is contained in:
parent
035b1857ed
commit
5b03065087
1 changed files with 5 additions and 1 deletions
|
@ -688,9 +688,13 @@ static int connection_set_isolation_level(Connection* self, PyObject* isolation_
|
|||
|
||||
Py_XDECREF(self->isolation_level);
|
||||
|
||||
if (self->begin_statement) {
|
||||
PyMem_Free(self->begin_statement);
|
||||
self->begin_statement = NULL;
|
||||
}
|
||||
|
||||
if (isolation_level == Py_None) {
|
||||
Py_INCREF(Py_None);
|
||||
self->begin_statement = NULL;
|
||||
self->isolation_level = Py_None;
|
||||
|
||||
empty = PyTuple_New(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue