diff mbox

gpu: ion: Fix memory leak of sg_table in carveout heap

Message ID CAMcxFTQFc2jwZoY867jinVDqE102rDyygobdsWkk3ognpBPz+A@mail.gmail.com
State New
Headers show

Commit Message

Nishanth Peethambaran Dec. 12, 2012, 1:08 a.m. UTC
Change-Id: I03ce713510a942d5a290ec56c1c7490602632fd9
Signed-off-by: Nishanth Peethambaran <nishanth@broadcom.com>
---
 drivers/gpu/ion/ion_carveout_heap.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/ion/ion_carveout_heap.c
b/drivers/gpu/ion/ion_carveout_heap.c
index ce8d311..e8164a6 100644
--- a/drivers/gpu/ion/ion_carveout_heap.c
+++ b/drivers/gpu/ion/ion_carveout_heap.c
@@ -107,6 +107,7 @@  void ion_carveout_heap_unmap_dma(struct ion_heap *heap,
 				 struct ion_buffer *buffer)
 {
 	sg_free_table(buffer->sg_table);
+	kfree(buffer->sg_table);
 }

 void *ion_carveout_heap_map_kernel(struct ion_heap *heap,