Skip to content

Commit 3bafd1a

Browse files
committed
Fix refleak in typevarobject.c
1 parent c9d5cac commit 3bafd1a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Objects/typevarobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2310,6 +2310,7 @@ _Py_subscript_generic(PyThreadState* unused, PyObject *params)
23102310
PyInterpreterState *interp = _PyInterpreterState_GET();
23112311
if (interp->cached_objects.generic_type == NULL) {
23122312
PyErr_SetString(PyExc_SystemError, "Cannot find Generic type");
2313+
Py_DECREF(params);
23132314
return NULL;
23142315
}
23152316
PyObject *args[2] = {(PyObject *)interp->cached_objects.generic_type, params};

0 commit comments

Comments
 (0)