OSDN Git Service

DO NOT MERGE BQ: fix some uninitialized variables
authorPablo Ceballos <pceballos@google.com>
Wed, 16 Mar 2016 01:10:49 +0000 (18:10 -0700)
committerPablo Ceballos <pceballos@google.com>
Wed, 16 Mar 2016 01:18:02 +0000 (18:18 -0700)
Bug 27555981
Bug 27556038

Change-Id: I436b6fec589677d7e36c0e980f6e59808415dc0e

libs/gui/IGraphicBufferConsumer.cpp
libs/gui/IGraphicBufferProducer.cpp

index 9574b61..ea98296 100644 (file)
@@ -410,7 +410,7 @@ status_t BnGraphicBufferConsumer::onTransact(
         } break;
         case GET_RELEASED_BUFFERS: {
             CHECK_INTERFACE(IGraphicBufferConsumer, data, reply);
-            uint32_t slotMask;
+            uint32_t slotMask = 0;
             status_t result = getReleasedBuffers(&slotMask);
             reply->writeInt32(slotMask);
             reply->writeInt32(result);
index e713c04..6549a0c 100644 (file)
@@ -249,6 +249,7 @@ status_t BnGraphicBufferProducer::onTransact(
             QueueBufferOutput* const output =
                     reinterpret_cast<QueueBufferOutput *>(
                             reply->writeInplace(sizeof(QueueBufferOutput)));
+            memset(output, 0, sizeof(QueueBufferOutput));
             status_t res = connect(token, api, producerControlledByApp, output);
             reply->writeInt32(res);
             return NO_ERROR;