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

Commit 438a656b authored by Mengjie Xie's avatar Mengjie Xie Committed by android-build-merger
Browse files

mTraits is used without been locked

am: e32a1d7c

Change-Id: If5efb0ed85f4d1efc02dad9c1b1797bda3bd8670
parents 0b578c69 e32a1d7c
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -600,7 +600,7 @@ c2_status_t C2AllocatorIon::newLinearAllocation(
    }
    }


    std::shared_ptr<C2AllocationIon> alloc
    std::shared_ptr<C2AllocationIon> alloc
        = std::make_shared<C2AllocationIon>(dup(mIonFd), capacity, align, heapMask, flags, mTraits->id);
        = std::make_shared<C2AllocationIon>(dup(mIonFd), capacity, align, heapMask, flags, getId());
    ret = alloc->status();
    ret = alloc->status();
    if (ret == C2_OK) {
    if (ret == C2_OK) {
        *allocation = alloc;
        *allocation = alloc;
@@ -622,7 +622,7 @@ c2_status_t C2AllocatorIon::priorLinearAllocation(
    // TODO: get capacity and validate it
    // TODO: get capacity and validate it
    const C2HandleIon *h = static_cast<const C2HandleIon*>(handle);
    const C2HandleIon *h = static_cast<const C2HandleIon*>(handle);
    std::shared_ptr<C2AllocationIon> alloc
    std::shared_ptr<C2AllocationIon> alloc
        = std::make_shared<C2AllocationIon>(dup(mIonFd), h->size(), h->bufferFd(), mTraits->id);
        = std::make_shared<C2AllocationIon>(dup(mIonFd), h->size(), h->bufferFd(), getId());
    c2_status_t ret = alloc->status();
    c2_status_t ret = alloc->status();
    if (ret == C2_OK) {
    if (ret == C2_OK) {
        *allocation = alloc;
        *allocation = alloc;