fix [2855380] GRG19 monkey native crash in GraphicBufferAllocator
we were dereferencing the null pointer when freeing ashmem buffers. Change-Id: I7be6e1ae064148bea1076193c21a73b5a3f90297
This commit is contained in:
parent
c901bf964d
commit
041cfdf2cf
@ -282,8 +282,10 @@ int gpu_context_t::free_impl(private_handle_t const* hnd) {
|
||||
} else if (hnd->flags & private_handle_t::PRIV_FLAGS_USES_PMEM_ADSP) {
|
||||
pmem_allocator = &pmemAdspAllocator;
|
||||
}
|
||||
pmem_allocator->free_pmem_buffer(hnd->size, (void*)hnd->base,
|
||||
hnd->offset, hnd->fd);
|
||||
if (pmem_allocator) {
|
||||
pmem_allocator->free_pmem_buffer(hnd->size, (void*)hnd->base,
|
||||
hnd->offset, hnd->fd);
|
||||
}
|
||||
deps.terminateBuffer(&m->base, const_cast<private_handle_t*>(hnd));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user