diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index c9ee5687c2b..631fc23dcdb 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -4036,7 +4036,7 @@ update_lines_cols(PyObject *private_module) error: Py_XDECREF(o); - Py_DECREF(exposed_module); + Py_XDECREF(exposed_module); return 0; }