diff options
author | INADA Naoki <methane@users.noreply.github.com> | 2018-01-26 07:22:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-26 07:22:51 (GMT) |
commit | e76daebc0c8afa3981a4c5a8b54537f756e805de (patch) | |
tree | cf86cac4463005688dad484d5e5ce987b55d6928 /Objects/object.c | |
parent | 4112c5b97d9c1c7b034653d0e017ffa894a45c74 (diff) | |
download | cpython-e76daebc0c8afa3981a4c5a8b54537f756e805de.zip cpython-e76daebc0c8afa3981a4c5a8b54537f756e805de.tar.gz cpython-e76daebc0c8afa3981a4c5a8b54537f756e805de.tar.bz2 |
bpo-32571: Fix reading uninitialized memory (GH-5332)
Reported by Coverity Scan.
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Objects/object.c b/Objects/object.c index 7b2adbe..fef57fc 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -917,6 +917,11 @@ _PyObject_LookupAttr(PyObject *v, PyObject *name, PyObject **result) } *result = (*tp->tp_getattr)(v, (char *)name_str); } + else { + *result = NULL; + return 0; + } + if (*result != NULL) { return 1; } |