Trim device name and vendor.
Make use of std::unique_ptr.