Skip to content

Commit ca12a74

Browse files
authored
gh-132781: fix refleaks in crossinterp_exceptions.h post gh-132782 (#132989)
1 parent 8a4d4f3 commit ca12a74

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Python/crossinterp_exceptions.h

+2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ set_notshareableerror(PyThreadState *tstate, PyObject *cause, int force, const c
110110
}
111111
else {
112112
_ensure_notshareableerror(tstate, cause, force, msgobj);
113+
Py_DECREF(msgobj);
113114
}
114115
}
115116

@@ -123,6 +124,7 @@ format_notshareableerror_v(PyThreadState *tstate, PyObject *cause, int force,
123124
}
124125
else {
125126
_ensure_notshareableerror(tstate, cause, force, msgobj);
127+
Py_DECREF(msgobj);
126128
}
127129
}
128130

0 commit comments

Comments
 (0)