commit | 9cd87aaa54c2bfd3a2654cdd4e793f1e39389cac | [log] [tgz] |
---|---|---|
author | Marc-André Lemburg <mal@egenix.com> | Wed Oct 23 09:02:46 2002 +0000 |
committer | Marc-André Lemburg <mal@egenix.com> | Wed Oct 23 09:02:46 2002 +0000 |
tree | 2d3328d652dcdd8fc213f9bf846455dc7105bd79 | |
parent | 45186c4ce08093d5f0d2f141f6e557e9726aedb4 [diff] [blame] |
Fix for bug #626172: crash using unicode latin1 single char Python 2.2.3 candidate.
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 5f9f4a7..c1cdebc 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c
@@ -4485,10 +4485,8 @@ goto onError; } u = (PyUnicodeObject *)PyUnicode_FromObject(container); - if (u == NULL) { - Py_DECREF(v); + if (u == NULL) goto onError; - } size = PyUnicode_GET_SIZE(v); rhs = PyUnicode_AS_UNICODE(v);