mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-104584: Fix refleak when tracing through calls (GH-110593)
This commit is contained in:
parent
d5ec77fafd
commit
13380da91e
2 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue