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

Commit 429d378e authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "utils/SharedBuffer: Make variable write atomic" into gingerbread

parents 377ed81a f1c97695
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ int32_t SharedBuffer::release(uint32_t flags) const
{
    int32_t prev = 1;
    if (onlyOwner() || ((prev = android_atomic_dec(&mRefs)) == 1)) {
        mRefs = 0;
        android_atomic_write(0, &mRefs);
        if ((flags & eKeepStorage) == 0) {
            free(const_cast<SharedBuffer*>(this));
        }