mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
Repair refleaks in unicodeobject.
This commit is contained in:
parent
3f767795f6
commit
9f16760666
1 changed files with 3 additions and 0 deletions
|
|
@ -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,
|
||||||
*outpos += repsize;
|
*outpos += repsize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Py_DECREF(rep);
|
||||||
return enc_SUCCESS;
|
return enc_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue