getbuffer(): release the buffer on error (if the buffer is not contiguous)
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 @@
         return -1;
     }
     if (!PyBuffer_IsContiguous(view, 'C')) {
+        PyBuffer_Release(view);
         *errmsg = "contiguous buffer";
         return -1;
     }