bpo-38962: Fix reference leak in new_interpreter() (GH-17453) · python/cpython@b96c6b0 (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit b96c6b0

pablogsalmiss-islington

authored and

committed

File tree

1 file changed

lines changed

1 file changed

lines changed

Lines changed: 2 additions & 0 deletions

Original file line number Diff line number Diff line change
@@ -648,9 +648,11 @@ pycore_init_builtins(PyThreadState *tstate)
648 648 if (interp->builtins_copy == NULL) {
649 649 goto error;
650 650 }
651 +Py_DECREF(bimod);
651 652 return _PyStatus_OK();
652 653
653 654 error:
655 +Py_XDECREF(bimod);
654 656 return _PyStatus_ERR("can't initialize builtins module");
655 657 }
656 658