From: Heesub Shin Date: Fri, 20 Jun 2014 02:46:14 +0000 (+0900) Subject: staging: ion: fixup invalid kfree() calls on heap destroy X-Git-Tag: v3.17-rc1~123^2~1673 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=895ae8765726df407264dc661674e4e04eaf8664;p=~emulex%2Finfiniband.git staging: ion: fixup invalid kfree() calls on heap destroy I've noticed that the last commit to ion_system_heap.c ('staging: ion: optimize struct ion_system_heap') has an omission, so an invalid kfree() gets called on ion_system_heap_destroy(). As ION system heap is never destroyed until system shutdown, it may not cause any harm, but should be fixed. I should have caught this before the merge, my bad. Signed-off-by: Heesub Shin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index c826b4c6386..6b77c5195b4 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -304,7 +304,6 @@ void ion_system_heap_destroy(struct ion_heap *heap) for (i = 0; i < num_orders; i++) ion_page_pool_destroy(sys_heap->pools[i]); - kfree(sys_heap->pools); kfree(sys_heap); }