Merge "Bitmap.cpp: replace dup() with fcntl(F_DUPFD_CLOEXEC)"
diff --git a/core/jni/android/graphics/Bitmap.cpp b/core/jni/android/graphics/Bitmap.cpp
index b085bc9..b6fbb0a 100755
--- a/core/jni/android/graphics/Bitmap.cpp
+++ b/core/jni/android/graphics/Bitmap.cpp
@@ -1095,7 +1095,7 @@
#endif
// Dup the file descriptor so we can keep a reference to it after the Parcel
// is disposed.
- int dupFd = dup(blob.fd());
+ int dupFd = fcntl(blob.fd(), F_DUPFD_CLOEXEC, 0);
if (dupFd < 0) {
ALOGE("Error allocating dup fd. Error:%d", errno);
blob.release();