summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-01-26 23:11:47 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-01-26 23:11:47 (GMT)
commit726f6902ce9c4db8dc73074ed5323a3bdeb04194 (patch)
tree4cd613b30eb4de5d32752806b3348363406c7e6b
parent906d82db6d63c81b9d63a0c99039358bce2da6cb (diff)
downloadcpython-726f6902ce9c4db8dc73074ed5323a3bdeb04194.zip
cpython-726f6902ce9c4db8dc73074ed5323a3bdeb04194.tar.gz
cpython-726f6902ce9c4db8dc73074ed5323a3bdeb04194.tar.bz2
Fix a refleak in validate_constant()
Issue #26146.
-rw-r--r--Python/ast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/ast.c b/Python/ast.c
index 5422e9c..ecfc14c 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -164,8 +164,10 @@ validate_constant(PyObject *value)
if (!validate_constant(item)) {
Py_DECREF(it);
+ Py_DECREF(item);
return 0;
}
+ Py_DECREF(item);
}
Py_DECREF(it);