diff options
Diffstat (limited to 'gralloc4/src')
-rw-r--r-- | gralloc4/src/allocator/mali_gralloc_ion.cpp | 1 | ||||
-rw-r--r-- | gralloc4/src/core/mali_gralloc_bufferallocation.cpp | 4 | ||||
-rw-r--r-- | gralloc4/src/core/mali_gralloc_reference.cpp | 2 |
3 files changed, 2 insertions, 5 deletions
diff --git a/gralloc4/src/allocator/mali_gralloc_ion.cpp b/gralloc4/src/allocator/mali_gralloc_ion.cpp index 3123848..e807651 100644 --- a/gralloc4/src/allocator/mali_gralloc_ion.cpp +++ b/gralloc4/src/allocator/mali_gralloc_ion.cpp @@ -523,6 +523,7 @@ void mali_gralloc_ion_free(private_handle_t * const hnd) hnd->fds[i] = -1; hnd->bases[i] = 0; } + delete hnd; } static void mali_gralloc_ion_free_internal(buffer_handle_t * const pHandle, diff --git a/gralloc4/src/core/mali_gralloc_bufferallocation.cpp b/gralloc4/src/core/mali_gralloc_bufferallocation.cpp index e928637..d82ff8c 100644 --- a/gralloc4/src/core/mali_gralloc_bufferallocation.cpp +++ b/gralloc4/src/core/mali_gralloc_bufferallocation.cpp @@ -1118,8 +1118,6 @@ int mali_gralloc_buffer_allocate(const gralloc_buffer_descriptor_t *descriptors, { private_handle_t *hnd = (private_handle_t *)pHandle[i]; - mali_gralloc_dump_buffer_add(hnd); - if (shared) { /*each buffer will share the same backing store id.*/ @@ -1150,8 +1148,8 @@ int mali_gralloc_buffer_free(buffer_handle_t pHandle) return -1; } - mali_gralloc_ion_free(hnd); gralloc_shared_memory_free(hnd); + mali_gralloc_ion_free(hnd); return 0; } diff --git a/gralloc4/src/core/mali_gralloc_reference.cpp b/gralloc4/src/core/mali_gralloc_reference.cpp index 57b8f73..880f838 100644 --- a/gralloc4/src/core/mali_gralloc_reference.cpp +++ b/gralloc4/src/core/mali_gralloc_reference.cpp @@ -116,8 +116,6 @@ int mali_gralloc_reference_release(buffer_handle_t handle, bool canFree) { mali_gralloc_dump_buffer_erase(hnd); mali_gralloc_buffer_free(handle); - delete handle; - } } else if (hnd->remote_pid == getpid()) // never unmap buffers that were not imported into this process |