Skip to content
Permalink
Browse files

bpo-36412: fix a possible crash in dictobject.c's new_dict() (GH-12519)

  • Loading branch information
ZackerySpytz authored and methane committed Mar 24, 2019
1 parent a7987e7 commit 3d07c1ee1d2d475b74816117981d6ec752c26c23
@@ -0,0 +1 @@
Fix a possible crash when creating a new dictionary.
@@ -604,7 +604,9 @@ new_dict(PyDictKeysObject *keys, PyObject **values)
mp = PyObject_GC_New(PyDictObject, &PyDict_Type);
if (mp == NULL) {
dictkeys_decref(keys);
free_values(values);
if (values != empty_values) {
free_values(values);
}
return NULL;
}
}

0 comments on commit 3d07c1e

Please sign in to comment.
You can’t perform that action at this time.