mirror of https://github.com/python/cpython
bpo-36374: Fix a possible null pointer dereference (GH-12449)
https://bugs.python.org/issue36374
This commit is contained in:
parent
fa15376848
commit
9b4a1b1e23
|
@ -0,0 +1,2 @@
|
|||
Fix a possible null pointer dereference in ``merge_consts_recursive()``.
|
||||
Patch by Zackery Spytz.
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue