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

Commit 89dfbfa2 authored by Josh Gao's avatar Josh Gao
Browse files

MemoryIntArray: don't double close.

Oops, in the process of trying to track down a double close, I
introduced one...

This was caught by fdsan immediately when running the tests, but a
tombstone wasn't generated, due to a race with ActivityManager killing
crash_dump before it finished generating a tombstone. (b/112564871)

Bug: http://b/112405224
Test: atest MemoryIntArrayTest (looking at logcat this time...)
Change-Id: Iac154b92a945ce9ac8d0721e7bf200e73e6fb484
parent bf668472
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -142,8 +142,6 @@ static void android_util_MemoryIntArray_close(JNIEnv* env, jobject clazz, jint f
        jniThrowException(env, "java/io/IOException", "ashmem unpinning failed");
        return;
    }

    close(fd);
}

static jint android_util_MemoryIntArray_get(JNIEnv* env, jobject clazz,