CpuConsumer: Don't unlock buffers on producer disconnect

Bug: 8291751

Change-Id: I062a3d34b41183d07fb6b9109cdb6bf0c0c75672
diff --git a/include/gui/CpuConsumer.h b/include/gui/CpuConsumer.h
index a08c718..a7fdc0a 100644
--- a/include/gui/CpuConsumer.h
+++ b/include/gui/CpuConsumer.h
@@ -92,7 +92,11 @@
 
     // Array for tracking pointers passed to the consumer, matching the
     // mSlots indexing
-    void *mBufferPointers[BufferQueue::NUM_BUFFER_SLOTS];
+    struct LockedSlot {
+        sp<GraphicBuffer> mGraphicBuffer;
+        void *mBufferPointer;
+    } mLockedSlots[BufferQueue::NUM_BUFFER_SLOTS];
+
     // Count of currently locked buffers
     uint32_t mCurrentLockedBuffers;