changeset: 86782:7097b5c39db0 user: Victor Stinner date: Wed Oct 30 18:55:24 2013 +0100 files: Modules/posixmodule.c description: Issue #19437: Fix os.statvfs(), handle errors diff -r 52ec6a3eeda5 -r 7097b5c39db0 Modules/posixmodule.c --- a/Modules/posixmodule.c Wed Oct 30 18:27:13 2013 +0100 +++ b/Modules/posixmodule.c Wed Oct 30 18:55:24 2013 +0100 @@ -9173,6 +9173,10 @@ PyStructSequence_SET_ITEM(v, 8, PyLong_FromLong((long) st.f_flag)); PyStructSequence_SET_ITEM(v, 9, PyLong_FromLong((long) st.f_namemax)); #endif + if (PyErr_Occurred()) { + Py_DECREF(v); + return NULL; + } return v; }