diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-11-02 23:07:10 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-11-02 23:07:10 +0000 |
commit | 41360e779e2004176152e72f902b8a08e9fc6a3b (patch) | |
tree | 95580b01cd25e28d0aa64b4317dcbd2408a8f955 | |
parent | c2ff3882613a8ac9513e9e155815114c16b61026 (diff) | |
parent | 6f338e896b0c20847529eca4846c2ab80c7a47a9 (diff) | |
download | gchips-41360e779e2004176152e72f902b8a08e9fc6a3b.tar.gz |
Snap for 7876370 from 6f338e896b0c20847529eca4846c2ab80c7a47a9 to sc-v2-release
Change-Id: Id27d9849f6263a72eb649ddafeb367cb9b9739f1
-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 dd003c9..4b96743 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 |