summaryrefslogtreecommitdiffstats
path: root/Python/bytecodes.c
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2024-06-03 19:26:25 (GMT)
committerGitHub <noreply@github.com>2024-06-03 19:26:25 (GMT)
commit3bf7a5079c8d1845af98c145056e7ae1e102be43 (patch)
tree18e5a246626b2f2b12eef3827a106caaaa2e2fb7 /Python/bytecodes.c
parent0480fd628a33351be868460c6febc09541ac722c (diff)
downloadcpython-3bf7a5079c8d1845af98c145056e7ae1e102be43.zip
cpython-3bf7a5079c8d1845af98c145056e7ae1e102be43.tar.gz
cpython-3bf7a5079c8d1845af98c145056e7ae1e102be43.tar.bz2
[3.12] gh-119821: Fix refleak in LOAD_FROM_DICT_OR_GLOBALS (#119975)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r--Python/bytecodes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index 18061b6..e17b229 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -1209,6 +1209,7 @@ dummy_func(
format_exc_check_arg(tstate, PyExc_NameError,
NAME_ERROR_MSG, name);
}
+ Py_DECREF(mod_or_class_dict);
ERROR_IF(true, error);
}
Py_INCREF(v);
@@ -1230,6 +1231,7 @@ dummy_func(
tstate, PyExc_NameError,
NAME_ERROR_MSG, name);
}
+ Py_DECREF(mod_or_class_dict);
ERROR_IF(true, error);
}
}