There was an error while loading. Please reload this page.
1 parent 1ce3f84 commit f38a5c2Copy full SHA for f38a5c2
1 file changed
Modules/_localemodule.c
@@ -151,8 +151,10 @@ PyLocale_localeconv(PyObject* self)
151
do { \
152
if (obj == NULL) \
153
goto failed; \
154
- if (PyDict_SetItemString(result, key, obj) < 0) \
+ if (PyDict_SetItemString(result, key, obj) < 0) { \
155
+ Py_DECREF(obj); \
156
157
+ } \
158
Py_DECREF(obj); \
159
} while (0)
160
@@ -196,7 +198,6 @@ PyLocale_localeconv(PyObject* self)
196
198
197
199
failed:
200
Py_XDECREF(result);
- Py_XDECREF(x);
201
return NULL;
202
}
203
0 commit comments