Author: neal.norwitz
Date: Sat Aug 11 06:58:26 2007
New Revision: 56912
Modified:
python/branches/py3k/Python/codecs.c
Log:
Handle error
Modified: python/branches/py3k/Python/codecs.c
==============================================================================
--- python/branches/py3k/Python/codecs.c (original)
+++ python/branches/py3k/Python/codecs.c Sat Aug 11 06:58:26 2007
@@ -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;
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins