commit | 7131a73f9655cfd325c798385905326f57b94640 | [log] [tgz] |
---|---|---|
author | Xiang Zhang <angwerzx@126.com> | Mon Feb 20 14:32:53 2017 +0800 |
committer | GitHub <noreply@github.com> | Mon Feb 20 14:32:53 2017 +0800 |
tree | 9952b4359f776b2f2d88c2cf53f2a9441f062395 | |
parent | af9a40d58c5992b60dc7f361d1b52720c1641cca [diff] [blame] |
bpo-29347: Fix possibly dereferencing undefined pointers when creating weakref objects (#128) (#187)
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c index c8b982f..2eb4fe0 100644 --- a/Objects/weakrefobject.c +++ b/Objects/weakrefobject.c
@@ -24,6 +24,8 @@ { self->hash = -1; self->wr_object = ob; + self->wr_prev = NULL; + self->wr_next = NULL; Py_XINCREF(callback); self->wr_callback = callback; }