diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-18 21:35:21 +0100 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-18 21:35:21 +0100 |
commit | ac456a183926d187c52e7dd80b9212881dd88af5 (patch) | |
tree | ed90cb9d4ba6110d4edda2e802a3282d91ff25c2 | |
parent | 8b0a74e93680b8142d016d7a006939d97e33f044 (diff) | |
download | cpython-git-ac456a183926d187c52e7dd80b9212881dd88af5.tar.gz |
Fix some of the remaining test_capi leaks
-rw-r--r-- | Objects/exceptions.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c index fc299f599e..6529482f1f 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -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); |