OSDN Git Service

delete the unused gralloc_handle while sharing dmabuf,
authorxue.yifei <yifei.xue@intel.com>
Mon, 21 Jan 2019 02:54:59 +0000 (10:54 +0800)
committerLin Johnson <johnson.lin@intel.com>
Mon, 21 Jan 2019 05:09:47 +0000 (13:09 +0800)
otherwise it will cause memory leak

Change-Id: Ibf35fdd14b74d8261feea4d08d1a89fa4b7378ee
Tracked-On: None
Tests: function test on android
Signed-off-by: xue.yifei <yifei.xue@intel.com>
common/display/virtualdisplay.cpp

index b9a61b3..e883dd5 100644 (file)
@@ -418,6 +418,7 @@ void VirtualDisplay::SetOutputBuffer(HWCNativeHandle buffer,
                                      int32_t acquire_fence) {
 #ifdef HYPER_DMABUF_SHARING
   if (display_index_ == 0) {
+    delete buffer;
     return;
   }
 #endif