also decref the right thing

This commit is contained in:
Benjamin Peterson 2012-01-02 10:12:13 -06:00
parent 4c13a4a352
commit 5e458f520c
1 changed files with 1 additions and 1 deletions

View File

@ -9140,7 +9140,7 @@ PyUnicode_Count(PyObject *str,
return -1;
}
if (PyUnicode_READY(sub_obj) == -1 || PyUnicode_READY(str_obj) == -1) {
Py_DECREF(substr);
Py_DECREF(sub_obj);
Py_DECREF(str_obj);
return -1;
}