fix [2855380] GRG19 monkey native crash in GraphicBufferAllocator

we were dereferencing the null pointer when freeing ashmem buffers.

Change-Id: I7be6e1ae064148bea1076193c21a73b5a3f90297
diff --git a/libgralloc-qsd8k/gpu.cpp b/libgralloc-qsd8k/gpu.cpp
index bcca1eb..a5c7442 100644
--- a/libgralloc-qsd8k/gpu.cpp
+++ b/libgralloc-qsd8k/gpu.cpp
@@ -282,8 +282,10 @@
         } 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));
     }