mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +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,
|
if (charmap_encoding_error(p, size, &inpos, mapping,
|
||||||
&exc,
|
&exc,
|
||||||
&known_errorHandler, &errorHandler, errors,
|
&known_errorHandler, &errorHandler, errors,
|
||||||
&res, &respos))
|
&res, &respos)) {
|
||||||
|
Py_DECREF(x);
|
||||||
goto onError;
|
goto onError;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
/* done with this character => adjust input position */
|
/* done with this character => adjust input position */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue