Fix some of the remaining test_capi leaks
This commit is contained in:
parent
8b0a74e936
commit
ac456a1839
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue