ion: carveout heap: zero buffers on free, fix memory leak
authorColin Cross <ccross@android.com>
Sat, 14 Dec 2013 03:26:29 +0000 (19:26 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2013 16:59:54 +0000 (08:59 -0800)
commited5bf01aac7a524a1ca05f96947aeba8363cb669
tree7adabdd0a9658701cb1eed97acdab0b2c9a75154
parentf63958d80c07c04db48812d97ff7450517d80ffa
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.

Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/ion/ion_carveout_heap.c