Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix dealloc for cache type as well
  • Loading branch information
Erlend E. Aasland
Erlend E. Aasland committed Sep 26, 2020
commit fad7260d3c5735c63af1df80ae6f15ed2b8b530c
5 changes: 3 additions & 2 deletions Modules/_sqlite/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ int pysqlite_cache_init(pysqlite_Cache* self, PyObject* args, PyObject* kwargs)

void pysqlite_cache_dealloc(pysqlite_Cache* self)
{
PyTypeObject *tp = Py_TYPE(self);
pysqlite_Node* node;
pysqlite_Node* delete_node;

Expand All @@ -112,8 +113,8 @@ void pysqlite_cache_dealloc(pysqlite_Cache* self)
}
Py_DECREF(self->mapping);

Py_TYPE(self)->tp_free((PyObject*)self);
Py_DECREF(pysqlite_CacheType);
tp->tp_free(self);
Py_DECREF(tp);
}

PyObject* pysqlite_cache_get(pysqlite_Cache* self, PyObject* key)
Expand Down