diff mbox

gpu: ion: Fix a kmalloc leak in carveout heap

Message ID CAMcxFTSmW-mPKvdCMTjYr2sjq4X2KV794D1ug1bScbrF6PinVA@mail.gmail.com
State New
Headers show

Commit Message

Nishanth Peethambaran Feb. 9, 2013, 6:12 p.m. UTC
Free the sg_table allocated.

Signed-off-by: Nishanth Peethambaran <nishanth@broadcom.com>
---
 drivers/gpu/ion/ion_carveout_heap.c |    1 +
 1 file changed, 1 insertion(+)
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,