summaryrefslogtreecommitdiffstats
path: root/Modules/termios.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/termios.c')
-rw-r--r--Modules/termios.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/termios.c b/Modules/termios.c
index b4aa77f..7601b68 100644
--- a/Modules/termios.c
+++ b/Modules/termios.c
@@ -119,11 +119,11 @@ termios_tcgetattr(PyObject *self, PyObject *args)
PyList_SetItem(v, 3, PyLong_FromLong((long)mode.c_lflag));
PyList_SetItem(v, 4, PyLong_FromLong((long)ispeed));
PyList_SetItem(v, 5, PyLong_FromLong((long)ospeed));
- PyList_SetItem(v, 6, cc);
- if (PyErr_Occurred()){
+ if (PyErr_Occurred()) {
Py_DECREF(v);
goto err;
}
+ PyList_SetItem(v, 6, cc);
return v;
err:
Py_DECREF(cc);