mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Fix a possible segfault. Found be Neal Norvitz.
This commit is contained in:
parent
4da6fd63bc
commit
4164439240
1 changed files with 1 additions and 1 deletions
|
@ -2890,7 +2890,7 @@ int PyUnicode_Find(PyObject *str,
|
||||||
return -2;
|
return -2;
|
||||||
substr = PyUnicode_FromObject(substr);
|
substr = PyUnicode_FromObject(substr);
|
||||||
if (substr == NULL) {
|
if (substr == NULL) {
|
||||||
Py_DECREF(substr);
|
Py_DECREF(str);
|
||||||
return -2;
|
return -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue