mirror of
https://github.com/python/cpython.git
synced 2025-11-09 14:06:30 +00:00
GH-104371: check return value of calling mv.release (#104417)
This commit is contained in:
parent
5b8cd5abe5
commit
a052be4c0d
1 changed files with 7 additions and 1 deletions
|
|
@ -9158,7 +9158,13 @@ releasebuffer_call_python(PyObject *self, Py_buffer *buffer)
|
||||||
Py_DECREF(ret);
|
Py_DECREF(ret);
|
||||||
}
|
}
|
||||||
if (!is_buffer_wrapper) {
|
if (!is_buffer_wrapper) {
|
||||||
PyObject_CallMethodNoArgs(mv, &_Py_ID(release));
|
PyObject *res = PyObject_CallMethodNoArgs(mv, &_Py_ID(release));
|
||||||
|
if (res == NULL) {
|
||||||
|
PyErr_WriteUnraisable(self);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Py_DECREF(res);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Py_DECREF(mv);
|
Py_DECREF(mv);
|
||||||
end:
|
end:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue