mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #14181: Preserve backwards compatibility for getbufferprocs that a) do
not adhere to the new documentation and b) manage to clobber view->obj before returning failure.
This commit is contained in:
parent
bf6c7eca43
commit
1649c1b33a
3 changed files with 23 additions and 16 deletions
|
@ -86,7 +86,7 @@ _PyManagedBuffer_FromObject(PyObject *base)
|
|||
return NULL;
|
||||
|
||||
if (PyObject_GetBuffer(base, &mbuf->master, PyBUF_FULL_RO) < 0) {
|
||||
/* mbuf->master.obj must be NULL. */
|
||||
mbuf->master.obj = NULL;
|
||||
Py_DECREF(mbuf);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue