[Python-checkins] cpython: Fix some of the remaining test_capi leaks
antoine.pitrou
python-checkins at python.org
Wed Jan 18 21:49:02 CET 2012
http://hg.python.org/cpython/rev/44d8aa3c1003
changeset: 74509:44d8aa3c1003
user: Antoine Pitrou <solipsis at pitrou.net>
date: Wed Jan 18 21:35:21 2012 +0100
summary:
Fix some of the remaining test_capi leaks
files:
Objects/exceptions.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -2400,9 +2400,11 @@
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);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list