Fix another refcounting leak in PyUnicode_EncodeCharmap().

This commit is contained in:
Walter Dörwald 2003-08-15 16:26:34 +00:00
parent d4ade0885c
commit 9b30f206ee
1 changed files with 3 additions and 1 deletions

View File

@ -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 */