IGraphicBufferConsumer: fix ATTACH_BUFFER info leak

Bug: 26338113
Change-Id: I019c4df2c6adbc944122df96968ddd11a02ebe33
This commit is contained in:
Robert Shih 2016-01-11 11:42:48 -08:00
parent dbc9a47831
commit dded8fdbb7

View File

@ -444,7 +444,7 @@ status_t BnGraphicBufferConsumer::onTransact(
CHECK_INTERFACE(IGraphicBufferConsumer, data, reply); CHECK_INTERFACE(IGraphicBufferConsumer, data, reply);
sp<GraphicBuffer> buffer = new GraphicBuffer(); sp<GraphicBuffer> buffer = new GraphicBuffer();
data.read(*buffer.get()); data.read(*buffer.get());
int slot; int slot = -1;
int result = attachBuffer(&slot, buffer); int result = attachBuffer(&slot, buffer);
reply->writeInt32(slot); reply->writeInt32(slot);
reply->writeInt32(result); reply->writeInt32(result);