Skip to content

Commit b69e661

Browse files
author
walter.doerwald
committed
Release codecs variable earlier.
git-svn-id: http://svn.python.org/projects/python/trunk@43134 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent bbad9a9 commit b69e661

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Python/codecs.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,14 @@ PyObject *codec_getincrementalcodec(const char *encoding,
230230
if (codecs == NULL)
231231
return NULL;
232232
inccodec = PyObject_GetAttrString(codecs, attrname);
233-
if (inccodec == NULL) {
234-
Py_DECREF(codecs);
233+
Py_DECREF(codecs);
234+
if (inccodec == NULL)
235235
return NULL;
236-
}
237236
if (errors)
238237
ret = PyObject_CallFunction(inccodec, "s", errors);
239238
else
240239
ret = PyObject_CallFunction(inccodec, NULL);
241240
Py_DECREF(inccodec);
242-
Py_DECREF(codecs);
243241
return ret;
244242
}
245243

0 commit comments

Comments
 (0)