commit | 9edcc2e2fd6196886f9e94407833f14c2a854c22 | [log] [tgz] |
---|---|---|
author | Neal Norwitz <nnorwitz@gmail.com> | Sat Aug 11 04:58:26 2007 +0000 |
committer | Neal Norwitz <nnorwitz@gmail.com> | Sat Aug 11 04:58:26 2007 +0000 |
tree | b49782030c81a51551afb4fcfe1d13436626bdf5 | |
parent | 7378df78225e9dcd3da7831c81f52f2af36692fc [diff] [blame] |
Handle error
diff --git a/Python/codecs.c b/Python/codecs.c index 3aa1f38..464fffc 100644 --- a/Python/codecs.c +++ b/Python/codecs.c
@@ -167,7 +167,10 @@ } /* Cache and return the result */ - PyDict_SetItem(interp->codec_search_cache, v, result); + if (PyDict_SetItem(interp->codec_search_cache, v, result) < 0) { + Py_DECREF(result); + goto onError; + } Py_DECREF(args); return result;