diff options
author | Xiang Zhang <angwerzx@126.com> | 2017-02-20 06:33:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-20 06:33:02 (GMT) |
commit | 9a4577a4bb23888fed2cf192cf1a4c95ce5c26f8 (patch) | |
tree | 605e1fef8b7bf179c99645802b48ceb114cc2ac1 /Objects | |
parent | a4afdfcf27c2fa53c60b65867765244361abb1fc (diff) | |
download | cpython-9a4577a4bb23888fed2cf192cf1a4c95ce5c26f8.zip cpython-9a4577a4bb23888fed2cf192cf1a4c95ce5c26f8.tar.gz cpython-9a4577a4bb23888fed2cf192cf1a4c95ce5c26f8.tar.bz2 |
bpo-29347: Fix possibly dereferencing undefined pointers when creating weakref objects (#128) (#186)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/weakrefobject.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c index ab6b235..9ca386d 100644 --- a/Objects/weakrefobject.c +++ b/Objects/weakrefobject.c @@ -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; } |