diff options
author | Marc-André Lemburg <mal@egenix.com> | 2002-10-23 09:02:46 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2002-10-23 09:02:46 (GMT) |
commit | 9cd87aaa54c2bfd3a2654cdd4e793f1e39389cac (patch) | |
tree | 2d3328d652dcdd8fc213f9bf846455dc7105bd79 /Objects/unicodeobject.c | |
parent | 45186c4ce08093d5f0d2f141f6e557e9726aedb4 (diff) | |
download | cpython-9cd87aaa54c2bfd3a2654cdd4e793f1e39389cac.zip cpython-9cd87aaa54c2bfd3a2654cdd4e793f1e39389cac.tar.gz cpython-9cd87aaa54c2bfd3a2654cdd4e793f1e39389cac.tar.bz2 |
Fix for bug #626172: crash using unicode latin1 single char
Python 2.2.3 candidate.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 4 |
1 files changed, 1 insertions, 3 deletions
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 @@ int PyUnicode_Contains(PyObject *container, 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); |