diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-04-16 03:28:17 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-04-16 03:28:17 (GMT) |
commit | 5b03065087ad398e368eb5d2bc828d8a5862c804 (patch) | |
tree | 7c45da21f85beb41a5bff3651a25d092192dbd6e /Modules | |
parent | 035b1857edb1d1193f00d54f9942cd972e809dec (diff) | |
download | cpython-5b03065087ad398e368eb5d2bc828d8a5862c804.zip cpython-5b03065087ad398e368eb5d2bc828d8a5862c804.tar.gz cpython-5b03065087ad398e368eb5d2bc828d8a5862c804.tar.bz2 |
Fix memory leak
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_sqlite/connection.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 90f1a7c..78aad37 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -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); |