summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_csv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_csv.c b/Modules/_csv.c
index 6380792..79870c0 100644
--- a/Modules/_csv.c
+++ b/Modules/_csv.c
@@ -416,7 +416,9 @@ dialect_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
}
ret = (PyObject *)self;
+ Py_INCREF(self);
err:
+ Py_XDECREF(self);
Py_XDECREF(dialect);
Py_XDECREF(delimiter);
Py_XDECREF(doublequote);