Commit 956f6502 authored by Stefan Behnel's avatar Stefan Behnel

fix memory leak in memory views when copying overlapping contiguous slices

--HG--
extra : amend_source : 6c9be6e15396919e08090d9d12557c4255fd8a3c
parent 514e1c65
......@@ -16,6 +16,8 @@ Features added
Bugs fixed
----------
* Memory leak in memory views when copying overlapping, contiguous slices.
* Format checking when requesting non-contiguous buffers from
``cython.array`` objects was disabled in Py3.
......
......@@ -1274,6 +1274,7 @@ cdef int memoryview_copy_contents({{memviewslice_name}} src,
refcount_copying(&dst, dtype_is_object, ndim, False)
memcpy(dst.data, src.data, slice_get_size(&src, ndim))
refcount_copying(&dst, dtype_is_object, ndim, True)
free(tmpdata)
return 0
if order == 'F' == get_best_order(&dst, ndim):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment