diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-18 20:29:05 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-18 20:29:05 (GMT) |
commit | 8b0a74e93680b8142d016d7a006939d97e33f044 (patch) | |
tree | 25926eaaa09ca424f3ca62e7a1ea9f0c9f8def18 /Objects | |
parent | 84091bfa4509e61f2115addbcbdd3f5dd95c1964 (diff) | |
download | cpython-8b0a74e93680b8142d016d7a006939d97e33f044.zip cpython-8b0a74e93680b8142d016d7a006939d97e33f044.tar.gz cpython-8b0a74e93680b8142d016d7a006939d97e33f044.tar.bz2 |
Fix some of the remaining test_capi refleaks
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/exceptions.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c index ab71605..fc299f5 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -2225,6 +2225,7 @@ PyObject *PyExc_RecursionErrorInst = NULL; Py_FatalError("Module dictionary insertion problem."); #define INIT_ALIAS(NAME, TYPE) Py_INCREF(PyExc_ ## TYPE); \ + Py_XDECREF(PyExc_ ## NAME); \ PyExc_ ## NAME = PyExc_ ## TYPE; \ if (PyDict_SetItemString(bdict, # NAME, PyExc_ ## NAME)) \ Py_FatalError("Module dictionary insertion problem."); @@ -2234,6 +2235,7 @@ PyObject *PyExc_RecursionErrorInst = NULL; assert(_PyObject_RealIsSubclass(PyExc_ ## TYPE, PyExc_OSError)); \ if (!_code || PyDict_SetItem(errnomap, _code, PyExc_ ## TYPE)) \ Py_FatalError("errmap insertion problem."); \ + Py_DECREF(_code); \ } #ifdef MS_WINDOWS |