Skip to content

Commit 8c46640

Browse files
committed
gh-139817: Fix refleak in TypeAliasType(qualname=non_string)
1 parent 3a81313 commit 8c46640

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Objects/typevarobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2134,6 +2134,7 @@ typealias_new_impl(PyTypeObject *type, PyObject *name, PyObject *value,
21342134
} else {
21352135
if (!PyUnicode_Check(qualname)) {
21362136
PyErr_SetString(PyExc_TypeError, "qualname must be a string");
2137+
Py_DECREF(module);
21372138
return NULL;
21382139
}
21392140
}

0 commit comments

Comments
 (0)