Skip to content

Commit 791e638

Browse files
author
Jamie Gennis
committed
SurfaceTexture: free buffers when disconnect fails
This change makes SurfaceTextureClient free its references to all the buffers even when the disconnect binder call to the SurfaceTexture fails. Bug: 5384823 Change-Id: Iad787fbae5fda4769546fd52276e4e4030c62be6
1 parent 5310a73 commit 791e638

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/gui/SurfaceTextureClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,9 @@ int SurfaceTextureClient::connect(int api) {
409409
int SurfaceTextureClient::disconnect(int api) {
410410
LOGV("SurfaceTextureClient::disconnect");
411411
Mutex::Autolock lock(mMutex);
412+
freeAllBuffers();
412413
int err = mSurfaceTexture->disconnect(api);
413414
if (!err) {
414-
freeAllBuffers();
415415
mReqFormat = 0;
416416
mReqWidth = 0;
417417
mReqHeight = 0;

0 commit comments

Comments
 (0)