bpo-32571: Fix reading uninitialized memory (GH-5332)

Reported by Coverity Scan.
This commit is contained in:
INADA Naoki 2018-01-26 16:22:51 +09:00 committed by GitHub
parent 4112c5b97d
commit e76daebc0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}