New submission from STINNER Victor victor.stin...@haypocalc.com:
PyArg_ParseTuple(t) calls PyObject_GetBuffer() and then raise an error if
arg-ob_type-tp_as_buffer-bf_releasebuffer is not NULL. I think that it
should call PyBuffer_Release(view) before raising the error, or simply check
bf_releasebuffer before calling PyObject_GetBuffer().
getbuffer() calls PyObject_GetBuffer() and then raise an error if the buffer is
not contiguous. I think that it should call PyBuffer_Release() before the error.
Attached patch fixes both errors.
Tell me if I'm wrong :-)
--
components: Interpreter Core
files: getarg_release.patch
keywords: patch
messages: 107210
nosy: haypo
priority: normal
severity: normal
status: open
title: getargs.c: release the buffer on error
versions: Python 3.2
Added file: http://bugs.python.org/file17577/getarg_release.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8926
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com