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

Commit 7c68c0c9 authored by Nick Kralevich's avatar Nick Kralevich Committed by android-build-merger
Browse files

Merge "replace dup() with fcntl(F_DUPFD_CLOEXEC)"

am: a6fc0b72

Change-Id: Ifdd7efd33b1e19dc6d0efc2bb7c3862918c6b775
parents f5201994 a6fc0b72
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -473,7 +473,7 @@ static jobject android_os_Parcel_readFileDescriptor(JNIEnv* env, jclass clazz, j
    if (parcel != NULL) {
        int fd = parcel->readFileDescriptor();
        if (fd < 0) return NULL;
        fd = dup(fd);
        fd = fcntl(fd, F_DUPFD_CLOEXEC, 0);
        if (fd < 0) return NULL;
        return jniCreateFileDescriptor(env, fd);
    }