make the PyUnicode_FSConverter cleanup set the decrefed argument to NULL (closes #25630)

This commit is contained in:
Benjamin Peterson 2015-11-15 21:57:39 -08:00
parent d0a5b1c343
commit a4d33b3428
2 changed files with 4 additions and 0 deletions

View file

@ -3614,6 +3614,7 @@ PyUnicode_FSConverter(PyObject* arg, void* addr)
void *data;
if (arg == NULL) {
Py_DECREF(*(PyObject**)addr);
*(PyObject**)addr = NULL;
return 1;
}
if (PyBytes_Check(arg)) {