diff options
author | Walter Dörwald <walter@livinglogic.de> | 2003-08-15 16:26:34 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2003-08-15 16:26:34 (GMT) |
commit | 9b30f206ee6bbef7f591f1dda9ecd9a20c7ef7a5 (patch) | |
tree | c568771f2900aa5f15baadb160f3478a5fa19ed6 /Objects/unicodeobject.c | |
parent | d4ade0885c9a1bf7013b555c93060e0126bfa7eb (diff) | |
download | cpython-9b30f206ee6bbef7f591f1dda9ecd9a20c7ef7a5.zip cpython-9b30f206ee6bbef7f591f1dda9ecd9a20c7ef7a5.tar.gz cpython-9b30f206ee6bbef7f591f1dda9ecd9a20c7ef7a5.tar.bz2 |
Fix another refcounting leak in PyUnicode_EncodeCharmap().
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 694c174..c56ef9f 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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 */ |