diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2023-10-10 08:29:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-10 08:29:48 (GMT) |
commit | 13380da91e75e1733a03a5e33af3733745575b51 (patch) | |
tree | 1b9a2ac1e5d58b3a9be5493d6eeee2b3657aee8a /Objects | |
parent | d5ec77fafd352b4eb290b86d70e4d0b4673459eb (diff) | |
download | cpython-13380da91e75e1733a03a5e33af3733745575b51.zip cpython-13380da91e75e1733a03a5e33af3733745575b51.tar.gz cpython-13380da91e75e1733a03a5e33af3733745575b51.tar.bz2 |
GH-104584: Fix refleak when tracing through calls (GH-110593)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/funcobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c index 231a9c1..e8ad486 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -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; } |