Commit f32f6aee authored by Jason Madden's avatar Jason Madden Committed by GitHub

Merge pull request #67 from zopefoundation/issue66

Fix possibility of rare crash during dealloc. Fixes #66
parents 740e1d42 4d2dcc93
......@@ -4,7 +4,8 @@
4.2.5 (unreleased)
------------------
- Nothing changed yet.
- Fix the possibility of a rare crash in the C extension when
deallocating items. See https://github.com/zopefoundation/persistent/issues/66
4.2.4.2 (2017-04-23)
......
......@@ -783,6 +783,7 @@ Per__getstate__(cPersistentObject *self)
static void
Per_dealloc(cPersistentObject *self)
{
PyObject_GC_UnTrack((PyObject *)self);
if (self->state >= 0)
{
/* If the cache has been cleared, then a non-ghost object
......
......@@ -891,6 +891,7 @@ cc_init(ccobject *self, PyObject *args, PyObject *kwds)
static void
cc_dealloc(ccobject *self)
{
PyObject_GC_UnTrack((PyObject *)self);
Py_XDECREF(self->data);
Py_XDECREF(self->jar);
PyObject_GC_Del(self);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment