mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Fix a possbile refleak in setint() of mmapmodule.c (GH-16136)
This commit is contained in:
parent
24d1597e43
commit
56a45142e7
1 changed files with 2 additions and 1 deletions
|
@ -1468,7 +1468,8 @@ static void
|
|||
setint(PyObject *d, const char *name, long value)
|
||||
{
|
||||
PyObject *o = PyLong_FromLong(value);
|
||||
if (o && PyDict_SetItemString(d, name, o) == 0) {
|
||||
if (o) {
|
||||
PyDict_SetItemString(d, name, o);
|
||||
Py_DECREF(o);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue