#1479: Fix refleak in csv module (from rev 59062).
diff --git a/Modules/_csv.c b/Modules/_csv.c
index 75cafb2..afa7810 100644
--- a/Modules/_csv.c
+++ b/Modules/_csv.c
@@ -793,14 +793,13 @@
 					     "newline inside string");
                         return NULL;
                 }
-		if (!PyUnicode_Check(lineobj))
-		{
-			PyErr_Format(error_obj,
-				     "Iterator should return strings, "
-				     "not %.200s "
-				     "(did you open the file in text mode?)",
+		if (!PyUnicode_Check(lineobj)) {
+			PyErr_Format(error_obj, "iterator should return "
+				     "strings, not %.200s (did you open "
+				     "the file in text mode?)",
 				     lineobj->ob_type->tp_name
 				);
+			Py_DECREF(lineobj);
 			return NULL;
 		}
                 ++self->line_num;