summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2019-03-20 09:16:25 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-03-20 09:16:25 (GMT)
commit9b4a1b1e23d4a7cb18ad26f405bdc741af69f342 (patch)
tree9f48b672192a1e4578f12e80b77d948cf237d9c9 /Python
parentfa1537684869186da7938e4330361bf02363bac8 (diff)
downloadcpython-9b4a1b1e23d4a7cb18ad26f405bdc741af69f342.zip
cpython-9b4a1b1e23d4a7cb18ad26f405bdc741af69f342.tar.gz
cpython-9b4a1b1e23d4a7cb18ad26f405bdc741af69f342.tar.bz2
bpo-36374: Fix a possible null pointer dereference (GH-12449)
https://bugs.python.org/issue36374
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 6978337..3656a7e 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1210,7 +1210,7 @@ merge_consts_recursive(struct compiler *c, PyObject *o)
PyObject *t = PyDict_SetDefault(c->c_const_cache, key, key);
if (t != key) {
// o is registered in c_const_cache. Just use it.
- Py_INCREF(t);
+ Py_XINCREF(t);
Py_DECREF(key);
return t;
}