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

Commit a6fc0b72 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

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

parents 7ae29536 c10f60a4
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);
    }