From 9b4a1b1e23d4a7cb18ad26f405bdc741af69f342 Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Wed, 20 Mar 2019 03:16:25 -0600 Subject: bpo-36374: Fix a possible null pointer dereference (GH-12449) https://bugs.python.org/issue36374 --- Python/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python') diff --git a/Python/compile.c b/Python/compile.c index 697833752b..3656a7e00e 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; } -- cgit v1.2.1