Fix some of the remaining test_capi leaks

This commit is contained in:
Antoine Pitrou 2012-01-18 21:35:21 +01:00
parent 8b0a74e936
commit ac456a1839
1 changed files with 5 additions and 3 deletions

View File

@ -2400,9 +2400,11 @@ _PyExc_Init(void)
POST_INIT(BytesWarning)
POST_INIT(ResourceWarning)
errnomap = PyDict_New();
if (!errnomap)
Py_FatalError("Cannot allocate map from errnos to OSError subclasses");
if (!errnomap) {
errnomap = PyDict_New();
if (!errnomap)
Py_FatalError("Cannot allocate map from errnos to OSError subclasses");
}
/* OSError subclasses */
POST_INIT(ConnectionError);