diff --git a/fastboot/usb_osx.cpp b/fastboot/usb_osx.cpp index a4b93079b..5b9e5c8af 100644 --- a/fastboot/usb_osx.cpp +++ b/fastboot/usb_osx.cpp @@ -456,8 +456,7 @@ static int init_usb(ifc_match_func callback, std::unique_ptr* handle } if (h.success) { - handle->reset(new usb_handle); - memcpy(handle->get(), &h, sizeof(usb_handle)); + handle->reset(new usb_handle(h)); ret = 0; break; }