From 0ec54e156bed93d59900b742c8e9adcfaee90612 Mon Sep 17 00:00:00 2001 From: Wonsik Kim Date: Fri, 21 Mar 2014 10:46:24 +0900 Subject: [PATCH] Declare ownership of native_handle_t object Change-Id: I4e21ff8ea76cfafce943dc059c8f72b42397980e --- libs/gui/IGraphicBufferConsumer.cpp | 2 +- libs/gui/IGraphicBufferProducer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/gui/IGraphicBufferConsumer.cpp b/libs/gui/IGraphicBufferConsumer.cpp index 3598a8610..d3dffdd5f 100644 --- a/libs/gui/IGraphicBufferConsumer.cpp +++ b/libs/gui/IGraphicBufferConsumer.cpp @@ -392,7 +392,7 @@ public: } sp stream; if (reply.readInt32()) { - stream = NativeHandle::create(reply.readNativeHandle()); + stream = NativeHandle::create(reply.readNativeHandle(), true); } return stream; } diff --git a/libs/gui/IGraphicBufferProducer.cpp b/libs/gui/IGraphicBufferProducer.cpp index 1d4ec1c0d..7c503156b 100644 --- a/libs/gui/IGraphicBufferProducer.cpp +++ b/libs/gui/IGraphicBufferProducer.cpp @@ -329,7 +329,7 @@ status_t BnGraphicBufferProducer::onTransact( CHECK_INTERFACE(IGraphicBufferProducer, data, reply); sp stream; if (data.readInt32()) { - stream = NativeHandle::create(data.readNativeHandle()); + stream = NativeHandle::create(data.readNativeHandle(), true); } status_t result = setSidebandStream(stream); reply->writeInt32(result);