From 89dfbfa269d32534a0b110593a2ed7e7183d21a7 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Mon, 13 Aug 2018 10:58:56 -0700 Subject: [PATCH] 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 --- core/jni/android_util_MemoryIntArray.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/jni/android_util_MemoryIntArray.cpp b/core/jni/android_util_MemoryIntArray.cpp index 2dfbe3ecfef6a..b68f9eca70cde 100644 --- a/core/jni/android_util_MemoryIntArray.cpp +++ b/core/jni/android_util_MemoryIntArray.cpp @@ -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,