#3303: fix crash with invalid Py_DECREF in strcoll().

This commit is contained in:
Georg Brandl 2008-07-19 12:46:12 +00:00
parent 6b41a8e156
commit 278fc50c07
3 changed files with 22 additions and 9 deletions

View file

@ -301,7 +301,9 @@ PyLocale_strcoll(PyObject* self, PyObject* args)
if (!PyUnicode_Check(os2)) {
os2 = PyUnicode_FromObject(os2);
if (!os2) {
Py_DECREF(os1);
if (rel1) {
Py_DECREF(os1);
}
return NULL;
}
rel2 = 1;