[Python-checkins] r82206 - python/branches/py3k/Python/getargs.c

victor.stinner python-checkins at python.org
Fri Jun 25 00:57:10 CEST 2010


Author: victor.stinner
Date: Fri Jun 25 00:57:10 2010
New Revision: 82206

Log:
getbuffer(): release the buffer on error (if the buffer is not contiguous)


Modified:
   python/branches/py3k/Python/getargs.c

Modified: python/branches/py3k/Python/getargs.c
==============================================================================
--- python/branches/py3k/Python/getargs.c	(original)
+++ python/branches/py3k/Python/getargs.c	Fri Jun 25 00:57:10 2010
@@ -1340,6 +1340,7 @@
         return -1;
     }
     if (!PyBuffer_IsContiguous(view, 'C')) {
+        PyBuffer_Release(view);
         *errmsg = "contiguous buffer";
         return -1;
     }


More information about the Python-checkins mailing list