[Python-checkins] r43134 - python/trunk/Python/codecs.c
walter.doerwald
python-checkins at python.org
Sat Mar 18 15:05:44 CET 2006
Author: walter.doerwald
Date: Sat Mar 18 15:05:43 2006
New Revision: 43134
Modified:
python/trunk/Python/codecs.c
Log:
Release codecs variable earlier.
Modified: python/trunk/Python/codecs.c
==============================================================================
--- python/trunk/Python/codecs.c (original)
+++ python/trunk/Python/codecs.c Sat Mar 18 15:05:43 2006
@@ -230,16 +230,14 @@
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;
}
More information about the Python-checkins
mailing list