summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite/connection.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-06-01 02:31:59 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-06-01 02:31:59 (GMT)
commitf17101a3077f1df02eee356f1cbe07c7dea211a0 (patch)
tree955b456b66fc42a4423445c836f24826bacab321 /Modules/_sqlite/connection.c
parent2945a998409fcbc507330c49b870aea8e819a00f (diff)
parent5c2b09e856555e34128113ac99758a776f66ce3c (diff)
downloadcpython-f17101a3077f1df02eee356f1cbe07c7dea211a0.zip
cpython-f17101a3077f1df02eee356f1cbe07c7dea211a0.tar.gz
cpython-f17101a3077f1df02eee356f1cbe07c7dea211a0.tar.bz2
merge 3.2
Diffstat (limited to 'Modules/_sqlite/connection.c')
-rw-r--r--Modules/_sqlite/connection.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 76d635a..3c83c7c 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -200,11 +200,13 @@ void pysqlite_do_all_statements(pysqlite_Connection* self, int action, int reset
weakref = PyList_GetItem(self->statements, i);
statement = PyWeakref_GetObject(weakref);
if (statement != Py_None) {
+ Py_INCREF(statement);
if (action == ACTION_RESET) {
(void)pysqlite_statement_reset((pysqlite_Statement*)statement);
} else {
(void)pysqlite_statement_finalize((pysqlite_Statement*)statement);
}
+ Py_DECREF(statement);
}
}