Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbeba102

Browse files
GH-93990: fix refcounting bug inadd_subclass intypeobject.c (GH-93989) (GH-93999)
(cherry picked from commit726448e)
1 parentf21b071 commitbeba102

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎Objects/typeobject.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6400,8 +6400,11 @@ add_subclass(PyTypeObject *base, PyTypeObject *type)
64006400
PyObject*dict=base->tp_subclasses;
64016401
if (dict==NULL) {
64026402
base->tp_subclasses=dict=PyDict_New();
6403-
if (dict==NULL)
6403+
if (dict==NULL) {
6404+
Py_DECREF(key);
6405+
Py_DECREF(ref);
64046406
return-1;
6407+
}
64056408
}
64066409
assert(PyDict_CheckExact(dict));
64076410

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp