diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-18 20:35:21 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-18 20:35:21 (GMT) |
commit | ac456a183926d187c52e7dd80b9212881dd88af5 (patch) | |
tree | ed90cb9d4ba6110d4edda2e802a3282d91ff25c2 /Objects | |
parent | 8b0a74e93680b8142d016d7a006939d97e33f044 (diff) | |
download | cpython-ac456a183926d187c52e7dd80b9212881dd88af5.zip cpython-ac456a183926d187c52e7dd80b9212881dd88af5.tar.gz cpython-ac456a183926d187c52e7dd80b9212881dd88af5.tar.bz2 |
Fix some of the remaining test_capi leaks
Diffstat (limited to 'Objects')
-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 fc299f5..6529482 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); |