From ba8e180f3be1cd43954c7e87a45488c46f316e51 Mon Sep 17 00:00:00 2001
From: =?utf8?q?Walter=20D=C3=B6rwald?= <walter@livinglogic.de>
Date: Sat, 18 Mar 2006 14:05:43 +0000
Subject: [PATCH] Release codecs variable earlier.

---
 Python/codecs.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/Python/codecs.c b/Python/codecs.c
index 532f1a6772..e2bb8fcbbf 100644
--- a/Python/codecs.c
+++ b/Python/codecs.c
@@ -230,16 +230,14 @@ PyObject *codec_getincrementalcodec(const char *encoding,
     if (codecs == NULL)
 	return NULL;
     inccodec = PyObject_GetAttrString(codecs, attrname);
-    if (inccodec == NULL) {
-	Py_DECREF(codecs);
+    Py_DECREF(codecs);
+    if (inccodec == NULL)
 	return NULL;
-    }
     if (errors)
 	ret = PyObject_CallFunction(inccodec, "s", errors);
     else
 	ret = PyObject_CallFunction(inccodec, NULL);
     Py_DECREF(inccodec);
-    Py_DECREF(codecs);
     return ret;
 }
 
-- 
2.49.0