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

Commit 3defea71 authored by George Burgess IV's avatar George Burgess IV Committed by Sungtak Lee
Browse files

Codec2Client: avoid a null pointer deref

Not 100% sure of the correctness of this fix, since I'm not super
familiar with this codebase; the static analyzer flagged `*syncObj`
below as a potential nullptr dereference, since we check for its
nullness below.

Bug: 157111613
Test: TreeHugger
Change-Id: I14817e97a70bf9ce0275885483a719bb1d0b4975
parent f4606652
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -222,7 +222,7 @@ bool OutputBufferQueue::configure(const sp<IGraphicBufferProducer>& igbp,
        if (generation == mGeneration) {
            // case of old BlockPool destruction
            C2SyncVariables *var = mSyncMem ? mSyncMem->mem() : nullptr;
            if (var) {
            if (syncObj && var) {
                *syncObj = std::make_shared<V1_2::SurfaceSyncObj>();
                (*syncObj)->bqId = bqId;
                (*syncObj)->syncMemory = mSyncMem->handle();