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

Commit c7ecca34 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "BufferHubBuffer.cpp: replace dup() with fcntl(F_DUPFD_CLOEXEC)"

parents 77081f8a 876a049f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -181,7 +181,7 @@ int BufferHubBuffer::initWithBufferTraits(const BufferTraits& bufferTraits) {
    }

    // Import the metadata. Dup since hidl_handle owns the fd
    unique_fd ashmemFd(dup(bufferTraits.bufferInfo->data[0]));
    unique_fd ashmemFd(fcntl(bufferTraits.bufferInfo->data[0], F_DUPFD_CLOEXEC, 0));
    mMetadata = BufferHubMetadata::Import(std::move(ashmemFd));

    if (!mMetadata.IsValid()) {