From: Antoine Pitrou Date: Wed, 18 Jan 2012 20:35:21 +0000 (+0100) Subject: Fix some of the remaining test_capi leaks X-Git-Tag: v3.3.0a1~349 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac456a183926d187c52e7dd80b9212881dd88af5;p=thirdparty%2FPython%2Fcpython.git Fix some of the remaining test_capi leaks --- diff --git a/Objects/exceptions.c b/Objects/exceptions.c index fc299f599e6f..6529482f1faf 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);