mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.13] gh-121791: Check for NULL
in MethodDescriptor2_new
in _testcapi
(GH-121792) (#121839)
gh-121791: Check for `NULL` in `MethodDescriptor2_new` in `_testcapi` (GH-121792)
(cherry picked from commit 8b6d475581
)
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
d02adecb42
commit
93ee63ae20
1 changed files with 3 additions and 0 deletions
|
@ -348,6 +348,9 @@ static PyObject *
|
|||
MethodDescriptor2_new(PyTypeObject* type, PyObject* args, PyObject *kw)
|
||||
{
|
||||
MethodDescriptor2Object *op = PyObject_New(MethodDescriptor2Object, type);
|
||||
if (op == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
op->base.vectorcall = NULL;
|
||||
op->vectorcall = MethodDescriptor_vectorcall;
|
||||
return (PyObject *)op;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue