Skip to content

Commit

Permalink
pythonGH-104584: Fix refleak when tracing through calls (pythonGH-110593
Browse files Browse the repository at this point in the history
)
  • Loading branch information
brandtbucher authored and Glyphack committed Jan 27, 2024
1 parent fc10555 commit 9308192
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a reference leak when running with :envvar:`PYTHONUOPS` or :option:`-X uops <-X>` enabled.
2 changes: 1 addition & 1 deletion Objects/funcobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ _PyFunction_LookupByVersion(uint32_t version)
PyFunctionObject *func = interp->func_state.func_version_cache[
version % FUNC_VERSION_CACHE_SIZE];
if (func != NULL && func->func_version == version) {
return (PyFunctionObject *)Py_NewRef(func);
return func;
}
return NULL;
}
Expand Down

0 comments on commit 9308192

Please sign in to comment.