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

Appearance settings

Commit 7d2deaf

Browse filesBrowse files
csm10495Eclips4
andauthored
gh-104454: Fix refleak in AttributeError_reduce (#104455)
* Fix the reference leak introduced by #103333 Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
1 parent 46f1c78 commit 7d2deaf
Copy full SHA for 7d2deaf

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎Objects/exceptions.c

Copy file name to clipboardExpand all lines: Objects/exceptions.c
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2324,7 +2324,9 @@ AttributeError_reduce(PyAttributeErrorObject *self, PyObject *Py_UNUSED(ignored)
23242324
return NULL;
23252325
}
23262326

2327-
return PyTuple_Pack(3, Py_TYPE(self), self->args, state);
2327+
PyObject *return_value = PyTuple_Pack(3, Py_TYPE(self), self->args, state);
2328+
Py_DECREF(state);
2329+
return return_value;
23282330
}
23292331

23302332
static PyMemberDef AttributeError_members[] = {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.