ion: carveout heap: zero buffers on free, fix memory leak
authorColin Cross <ccross@android.com>
Wed, 27 Nov 2013 05:36:54 +0000 (21:36 -0800)
committerColin Cross <ccross@android.com>
Thu, 12 Dec 2013 23:27:13 +0000 (15:27 -0800)
commit1ebba641fb19e38541e30666de8f26b7971949dc
treefcdf3452e53f60f83c3c47af85623eb168011943
parent6db8a1c0c9817d6ebd61c47110554aa34729e9a7
ion: carveout heap: zero buffers on free, fix memory leak

The carveout heap wasn't zeroing its buffers after use.
Create the sg_table during allocate instead of map_dma, to allow
using the sg_table during free, and call ion_heap_buffer_zero
during free.  Also fixes a missing kfree when destroying the
table.

Change-Id: I318a8493cce32580250884cae336dd2e2c28e73b
Signed-off-by: Colin Cross <ccross@android.com>
drivers/staging/android/ion/ion_carveout_heap.c