diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-11-02 13:46:25 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-11-02 13:46:25 +0000 |
commit | e48ceae78bf9040657b6f92e3de8b8260629c503 (patch) | |
tree | 95580b01cd25e28d0aa64b4317dcbd2408a8f955 | |
parent | ba064b1afedd32978da042bbc51f084f7b25d8fa (diff) | |
parent | d4d870386b2cde4952ff9bc26643c4319ddbfee6 (diff) | |
download | gchips-android12-qpr1-d-release.tar.gz |
Merge cherrypicks of [16074852, 16074853] into sc-qpr1-d-release.android-12.0.0_r32android-12.0.0_r29android-12.0.0_r27android-12.0.0_r21android-12.0.0_r20android-12.0.0_r19android-12.0.0_r18android12-qpr1-d-s3-releaseandroid12-qpr1-d-s2-releaseandroid12-qpr1-d-s1-releaseandroid12-qpr1-d-release
Change-Id: I32fadccbc4b159436b3e631e762d070843077608
-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 |