mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Fix another refcounting leak in PyUnicode_EncodeCharmap().
This commit is contained in:
parent
d4ade0885c
commit
9b30f206ee
1 changed files with 3 additions and 1 deletions
|
@ -3027,8 +3027,10 @@ PyObject *PyUnicode_EncodeCharmap(const Py_UNICODE *p,
|
|||
if (charmap_encoding_error(p, size, &inpos, mapping,
|
||||
&exc,
|
||||
&known_errorHandler, &errorHandler, errors,
|
||||
&res, &respos))
|
||||
&res, &respos)) {
|
||||
Py_DECREF(x);
|
||||
goto onError;
|
||||
}
|
||||
}
|
||||
else
|
||||
/* done with this character => adjust input position */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue