Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Address review comment.
  • Loading branch information
serhiy-storchaka committed Jun 29, 2023
commit ffc68fc01ccd2a6110e4e03f2a29306a6ee3ee05
1 change: 1 addition & 0 deletions Objects/funcobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ _PyFunction_FromConstructor(PyFrameConstructor *constr)

PyFunctionObject *op = PyObject_GC_New(PyFunctionObject, &PyFunction_Type);
if (op == NULL) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Py_XDECREF(module) before this error return.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Py_XDECREF(module);
return NULL;
}
op->func_globals = Py_NewRef(constr->fc_globals);
Expand Down