diff --git a/model/VolumeBase.cpp b/model/VolumeBase.cpp index d6e4288..08da8f6 100644 --- a/model/VolumeBase.cpp +++ b/model/VolumeBase.cpp @@ -149,7 +149,7 @@ status_t VolumeBase::setFuseFd(android::base::unique_fd fuseFd) { return -EBUSY; } - mFuseFd.reset(std::move(fuseFd.get())); + mFuseFd = std::move(fuseFd); return OK; } diff --git a/model/VolumeBase.h b/model/VolumeBase.h index 6afb88e..5deecdb 100644 --- a/model/VolumeBase.h +++ b/model/VolumeBase.h @@ -122,6 +122,7 @@ class VolumeBase { status_t setId(const std::string& id); status_t setPath(const std::string& path); status_t setInternalPath(const std::string& internalPath); + // Takes ownership of the fd passed in. status_t setFuseFd(android::base::unique_fd fuseFd); android::sp getListener() const;