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

Commit e13b6b62 authored by Yifan Hong's avatar Yifan Hong Committed by android-build-merger
Browse files

Merge "lshal: close fd before joining thread"

am: 16b9f38d

Change-Id: I7ab9f8e64e01dd5b1f2edba2e5db8404d8073b4c
parents 9ead54be 16b9f38d
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -77,13 +77,12 @@ void PipeRelay::CloseFd(int *fd) {


PipeRelay::~PipeRelay() {
PipeRelay::~PipeRelay() {
    CloseFd(&mFds[1]);
    CloseFd(&mFds[1]);
    CloseFd(&mFds[0]);


    if (mThread != nullptr) {
    if (mThread != nullptr) {
        mThread->join();
        mThread->join();
        mThread.clear();
        mThread.clear();
    }
    }

    CloseFd(&mFds[0]);
}
}


status_t PipeRelay::initCheck() const {
status_t PipeRelay::initCheck() const {