We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e62efc commit ed1007cCopy full SHA for ed1007c
Objects/exceptions.c
@@ -2547,8 +2547,10 @@ _PyExc_Init(PyThreadState *tstate)
2547
do { \
2548
PyObject *_code = PyLong_FromLong(CODE); \
2549
assert(_PyObject_RealIsSubclass(PyExc_ ## TYPE, PyExc_OSError)); \
2550
- if (!_code || PyDict_SetItem(state->errnomap, _code, PyExc_ ## TYPE)) \
+ if (!_code || PyDict_SetItem(state->errnomap, _code, PyExc_ ## TYPE)) { \
2551
+ Py_XDECREF(_code); \
2552
return _PyStatus_ERR("errmap insertion problem."); \
2553
+ } \
2554
Py_DECREF(_code); \
2555
} while (0)
2556
0 commit comments