diff options
author | Walter Dörwald <walter@livinglogic.de> | 2006-03-18 14:05:43 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2006-03-18 14:05:43 (GMT) |
commit | ba8e180f3be1cd43954c7e87a45488c46f316e51 (patch) | |
tree | fe62431484c719731292968ac77b35ee1dce6ee1 /Python | |
parent | f4063ca8bc632311974f3c5225d868183c653401 (diff) | |
download | cpython-ba8e180f3be1cd43954c7e87a45488c46f316e51.zip cpython-ba8e180f3be1cd43954c7e87a45488c46f316e51.tar.gz cpython-ba8e180f3be1cd43954c7e87a45488c46f316e51.tar.bz2 |
Release codecs variable earlier.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/codecs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/codecs.c b/Python/codecs.c index 532f1a6..e2bb8fc 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; } |