[issue8926] getargs.c: release the buffer on error

2010-06-24 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Fixed in r82206 and r82207.

--
resolution:  - fixed
status: open - closed

___
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



[issue8926] getargs.c: release the buffer on error

2010-06-06 Thread STINNER Victor

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