mirror of https://github.com/python/cpython
GH-104584: Fix refleak when tracing through calls (GH-110593)
This commit is contained in:
parent
d5ec77fafd
commit
13380da91e
|
@ -0,0 +1 @@
|
|||
Fix a reference leak when running with :envvar:`PYTHONUOPS` or :option:`-X uops <-X>` enabled.
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue