Issue #15876: Fix a refleak in the curses module

The refleak occurred when assigning to window.encoding.
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c
index 3f9ca13..4e1449b 100644
--- a/Modules/_cursesmodule.c
+++ b/Modules/_cursesmodule.c
@@ -1938,6 +1938,7 @@
     if (ascii == NULL)
         return -1;
     encoding = strdup(PyBytes_AS_STRING(ascii));
+    Py_DECREF(ascii);
     if (encoding == NULL) {
         PyErr_NoMemory();
         return -1;