From 26532f7519b9b7764dd046acab49d5fc5dbcd94d Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Sat, 20 Jul 2013 14:57:16 +0200 Subject: [PATCH] Check return value of PyType_Ready(&EncodingMapType) CID 486654 --- Objects/unicodeobject.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 2e40c273a4..446520ae93 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -14164,7 +14164,8 @@ int _PyUnicode_Init(void) PyUnicode_2BYTE_KIND, linebreak, Py_ARRAY_LENGTH(linebreak)); - PyType_Ready(&EncodingMapType); + if (PyType_Ready(&EncodingMapType) < 0) + Py_FatalError("Can't initialize encoding map type"); if (PyType_Ready(&PyFieldNameIter_Type) < 0) Py_FatalError("Can't initialize field name iterator type"); -- 2.40.0