diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-06-24 22:57:10 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-06-24 22:57:10 (GMT) |
commit | 21e09487ac9d4365819ae4de31319ae3df9a8b17 (patch) | |
tree | f9bb10a2bca800081496d4c2d5444a623b61d2bc /Python/getargs.c | |
parent | 8bae4ec62211bb71e4bad87b1a912301f616fb37 (diff) | |
download | cpython-21e09487ac9d4365819ae4de31319ae3df9a8b17.zip cpython-21e09487ac9d4365819ae4de31319ae3df9a8b17.tar.gz cpython-21e09487ac9d4365819ae4de31319ae3df9a8b17.tar.bz2 |
getbuffer(): release the buffer on error (if the buffer is not contiguous)
Diffstat (limited to 'Python/getargs.c')
-rw-r--r-- | Python/getargs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index ab95e1e..41b4af5 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -1340,6 +1340,7 @@ getbuffer(PyObject *arg, Py_buffer *view, char **errmsg) return -1; } if (!PyBuffer_IsContiguous(view, 'C')) { + PyBuffer_Release(view); *errmsg = "contiguous buffer"; return -1; } |