diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-09 11:14:04 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-09 11:14:04 (GMT) |
commit | 98a9722e4a82b5f7dc0411233bbec892a02c7667 (patch) | |
tree | 51179bb7d80e822a18d0ccbb41fde7198f424813 /Modules/_sqlite/connection.c | |
parent | 2cfae9b03f706e0d6889dfecc21f87419d926b00 (diff) | |
download | cpython-98a9722e4a82b5f7dc0411233bbec892a02c7667.zip cpython-98a9722e4a82b5f7dc0411233bbec892a02c7667.tar.gz cpython-98a9722e4a82b5f7dc0411233bbec892a02c7667.tar.bz2 |
Issue #20437: Fixed 43 potential bugs when deleting objects references.
Diffstat (limited to 'Modules/_sqlite/connection.c')
-rw-r--r-- | Modules/_sqlite/connection.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c index 59966dad..7a8a5a1b 100644 --- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -369,8 +369,7 @@ PyObject* pysqlite_connection_close(pysqlite_Connection* self, PyObject* args) if (self->apsw_connection) { ret = PyObject_CallMethod(self->apsw_connection, "close", ""); Py_XDECREF(ret); - Py_XDECREF(self->apsw_connection); - self->apsw_connection = NULL; + Py_CLEAR(self->apsw_connection); self->db = NULL; } else { Py_BEGIN_ALLOW_THREADS |