summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-11-02 13:46:25 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-11-02 13:46:25 +0000
commite48ceae78bf9040657b6f92e3de8b8260629c503 (patch)
tree95580b01cd25e28d0aa64b4317dcbd2408a8f955
parentba064b1afedd32978da042bbc51f084f7b25d8fa (diff)
parentd4d870386b2cde4952ff9bc26643c4319ddbfee6 (diff)
downloadgchips-android12-qpr1-d-release.tar.gz
Change-Id: I32fadccbc4b159436b3e631e762d070843077608
-rw-r--r--gralloc4/src/allocator/mali_gralloc_ion.cpp1
-rw-r--r--gralloc4/src/core/mali_gralloc_bufferallocation.cpp4
-rw-r--r--gralloc4/src/core/mali_gralloc_reference.cpp2
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