Kaydet (Commit) 9f167606 authored tarafından Georg Brandl's avatar Georg Brandl

Repair refleaks in unicodeobject.

üst 3f767795
...@@ -3194,6 +3194,8 @@ PyUnicode_BuildEncodingMap(PyObject* string) ...@@ -3194,6 +3194,8 @@ PyUnicode_BuildEncodingMap(PyObject* string)
goto failed1; goto failed1;
if (PyDict_SetItem(result, key, value) == -1) if (PyDict_SetItem(result, key, value) == -1)
goto failed1; goto failed1;
Py_DECREF(key);
Py_DECREF(value);
} }
return result; return result;
failed1: failed1:
...@@ -3389,6 +3391,7 @@ charmapencode_result charmapencode_output(Py_UNICODE c, PyObject *mapping, ...@@ -3389,6 +3391,7 @@ charmapencode_result charmapencode_output(Py_UNICODE c, PyObject *mapping,
*outpos += repsize; *outpos += repsize;
} }
} }
Py_DECREF(rep);
return enc_SUCCESS; return enc_SUCCESS;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment