ion: Use correct heap when freeing secure system heap buffers

Switch the heap for buffers from the secure system heap in
the free path, so that they can be properly released into
the secure pools.

Change-Id: I9873d73efa6f56a2c2ceb8d29e4b594ff30b9bca
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
Isaac J. Manjarres 2019-09-03 17:32:15 -07:00
commit 7672340484

View file

@ -66,6 +66,7 @@ static void ion_system_secure_heap_free(struct ion_buffer *buffer)
struct ion_system_secure_heap *secure_heap =
to_system_secure_heap(heap);
buffer->heap = secure_heap->sys_heap;
secure_heap->sys_heap->ops->free(buffer);
}