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

Commit 7e69f41b authored by Suprabh Shukla's avatar Suprabh Shukla Committed by android-build-merger
Browse files

Merge "Mitigating cache corruption in ArrayMap" into pi-dev

am: 841de8fb

Change-Id: Ia8e5eddc8837af23c2fdcb48b40e98f1eff3bc8b
parents 315211c7 841de8fb
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -644,9 +644,11 @@ public final class ArrayMap<K, V> implements Map<K, V> {
        if (osize <= 1) {
            // Now empty.
            if (DEBUG) Log.d(TAG, "remove: shrink from " + mHashes.length + " to 0");
            freeArrays(mHashes, mArray, osize);
            final int[] ohashes = mHashes;
            final Object[] oarray = mArray;
            mHashes = EmptyArray.INT;
            mArray = EmptyArray.OBJECT;
            freeArrays(ohashes, oarray, osize);
            nsize = 0;
        } else {
            nsize = osize - 1;