URL: http://github.com/python/cpython/commit/43441c77b5fd9617d7baff1cf3bbc072fef6035b
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 267941c + 3776836 commit 43441c7Copy full SHA for 43441c7
1 file changed
Modules/mmapmodule.c
@@ -383,8 +383,10 @@ mmap_write_method(mmap_object *self,
383
if (!PyArg_ParseTuple(args, "y*:write", &data))
384
return(NULL);
385
386
- if (!is_writable(self))
+ if (!is_writable(self)) {
387
+ PyBuffer_Release(&data);
388
return NULL;
389
+ }
390
391
if (self->pos > self->size || self->size - self->pos < data.len) {
392
PyBuffer_Release(&data);
0 commit comments