Issue #7561: Fix crashes when using bytearray objects with the posix

module.
This commit is contained in:
Antoine Pitrou 2010-01-17 12:16:23 +00:00
parent 4c1718c0e3
commit 1119a64916
3 changed files with 13 additions and 1 deletions

View file

@ -580,7 +580,7 @@ static void
release_bytes(PyObject* o)
{
if (PyByteArray_Check(o))
o->ob_type->tp_as_buffer->bf_releasebuffer(NULL, 0);
o->ob_type->tp_as_buffer->bf_releasebuffer(o, 0);
Py_DECREF(o);
}