Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 791e6382 authored by Jamie Gennis's avatar Jamie Gennis
Browse files

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
parent 5310a731
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -409,9 +409,9 @@ int SurfaceTextureClient::connect(int api) {
int SurfaceTextureClient::disconnect(int api) {
    LOGV("SurfaceTextureClient::disconnect");
    Mutex::Autolock lock(mMutex);
    freeAllBuffers();
    int err = mSurfaceTexture->disconnect(api);
    if (!err) {
        freeAllBuffers();
        mReqFormat = 0;
        mReqWidth = 0;
        mReqHeight = 0;