summaryrefslogtreecommitdiffstats
path: root/Modules/_cursesmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_cursesmodule.c')
-rw-r--r--Modules/_cursesmodule.c1
1 files changed, 1 insertions, 0 deletions
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 @@ PyCursesWindow_set_encoding(PyCursesWindowObject *self, PyObject *value)
if (ascii == NULL)
return -1;
encoding = strdup(PyBytes_AS_STRING(ascii));
+ Py_DECREF(ascii);
if (encoding == NULL) {
PyErr_NoMemory();
return -1;