summaryrefslogtreecommitdiffstats
path: root/Modules/mmapmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r--Modules/mmapmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index e25ec97..73871ac 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -1130,9 +1130,9 @@ static void
setint(PyObject *d, const char *name, long value)
{
PyObject *o = PyInt_FromLong(value);
- if (o)
- if (PyDict_SetItemString(d, name, o) == 0)
+ if (o && PyDict_SetItemString(d, name, o) == 0) {
Py_DECREF(o);
+ }
}
PyMODINIT_FUNC