Commit d0e8212e authored by Xiang Zhang's avatar Xiang Zhang Committed by GitHub

bpo-29347: Fix possibly dereferencing undefined pointers when creating weakref objects (#128)

parent e395c4db
......@@ -10,6 +10,9 @@ What's New in Python 3.7.0 alpha 1?
Core and Builtins
-----------------
- bpo-29347: Fixed possibly dereferencing undefined pointers
when creating weakref objects.
- bpo-29438: Fixed use-after-free problem in key sharing dict.
- bpo-29546: Set the 'path' and 'name' attribute on ImportError for ``from ... import ...``.
......
......@@ -24,6 +24,8 @@ init_weakref(PyWeakReference *self, PyObject *ob, PyObject *callback)
{
self->hash = -1;
self->wr_object = ob;
self->wr_prev = NULL;
self->wr_next = NULL;
Py_XINCREF(callback);
self->wr_callback = callback;
}
......
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