mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
#3303: fix crash with invalid Py_DECREF in strcoll().
This commit is contained in:
parent
6b41a8e156
commit
278fc50c07
3 changed files with 22 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue