summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_sqlite')
-rw-r--r--Modules/_sqlite/cache.c1
-rw-r--r--Modules/_sqlite/module.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/Modules/_sqlite/cache.c b/Modules/_sqlite/cache.c
index 18a4066..6094eb3 100644
--- a/Modules/_sqlite/cache.c
+++ b/Modules/_sqlite/cache.c
@@ -243,6 +243,7 @@ PyObject* pysqlite_cache_display(pysqlite_Cache* self, PyObject* args)
}
template = PyString_FromString("%s <- %s ->%s\n");
if (!template) {
+ Py_DECREF(fmt_args);
return NULL;
}
display_str = PyString_Format(template, fmt_args);
diff --git a/Modules/_sqlite/module.c b/Modules/_sqlite/module.c
index 8844d81..4525c61 100644
--- a/Modules/_sqlite/module.c
+++ b/Modules/_sqlite/module.c
@@ -287,12 +287,12 @@ PyMODINIT_FUNC init_sqlite3(void)
/*** Create DB-API Exception hierarchy */
- if (!(pysqlite_Error = PyErr_NewException(MODULE_NAME ".Error", PyExc_StandardError, NULL))) {
+ if (!(pysqlite_Error = PyErr_NewException(MODULE_NAME ".Error", PyExc_Exception, NULL))) {
goto error;
}
PyDict_SetItemString(dict, "Error", pysqlite_Error);
- if (!(pysqlite_Warning = PyErr_NewException(MODULE_NAME ".Warning", PyExc_StandardError, NULL))) {
+ if (!(pysqlite_Warning = PyErr_NewException(MODULE_NAME ".Warning", PyExc_Exception, NULL))) {
goto error;
}
PyDict_SetItemString(dict, "Warning", pysqlite_Warning);