FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-110300: Fix Refleaks in test_interpreters and test__xxinterpchannels by ericsnowcurrently · Pull Request #110318 · python/cpython · GitHub

Repository navigation

Prev Previous commit
Next Next commit
Add more missing decrefs.
  • Loading branch information
ericsnowcurrently committed Oct 3, 2023
commit 8bfdf89e44ceaa9f7b43846e5d241efdab18c5c3
5 changes: 4 additions & 1 deletion Modules/_xxinterpchannelsmodule.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2013,6 +2013,7 @@ _channel_end_from_xid(_PyCrossInterpreterData *data)
}
PyTypeObject *cls = _get_current_channel_end_type(cid->end);
if (cls == NULL) {
Py_DECREF(cid);
return NULL;
}
PyObject *obj = PyObject_CallOneArg((PyObject *)cls, (PyObject *)cid);
Expand All @@ -2028,7 +2029,9 @@ _channel_end_shared(PyThreadState *tstate, PyObject *obj,
if (cidobj == NULL) {
return -1;
}
if (_channelid_shared(tstate, cidobj, data) < 0) {
int res = _channelid_shared(tstate, cidobj, data);
Py_DECREF(cidobj);
if (res < 0) {
return -1;
}
data->new_object = _channel_end_from_xid;
Expand Down

Back | FazBrowse Home | New Git URL